mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-05 09:32:37 +02:00
Add a single space after the spinner by default.
To remove the white space use a format like --format="@\r"
This commit is contained in:
parent
1a8f2e2c1b
commit
f9680000f7
1 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ function wait -d "Run commands and display a spinner"
|
||||||
set -l option
|
set -l option
|
||||||
set -l commands
|
set -l commands
|
||||||
set -l spinners
|
set -l spinners
|
||||||
set -l format "@\r"
|
set -l format " @\r"
|
||||||
|
|
||||||
getopts $argv | while read -l 1 2
|
getopts $argv | while read -l 1 2
|
||||||
switch "$1"
|
switch "$1"
|
||||||
|
@ -114,7 +114,7 @@ function wait -d "Run commands and display a spinner"
|
||||||
printf "$format" | awk -v i=(printf "%s\n" $i | sed 's/=/\\\=/') '
|
printf "$format" | awk -v i=(printf "%s\n" $i | sed 's/=/\\\=/') '
|
||||||
{
|
{
|
||||||
gsub("@", i)
|
gsub("@", i)
|
||||||
printf(" %s", $0)
|
printf("%s", $0)
|
||||||
}
|
}
|
||||||
' > /dev/stderr
|
' > /dev/stderr
|
||||||
|
|
||||||
|
@ -123,13 +123,13 @@ function wait -d "Run commands and display a spinner"
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -z (jobs)
|
if test -z (jobs)
|
||||||
printf "$format" | tr @ "\0" > /dev/stderr
|
# printf "$format" | tr @ "\0" > /dev/stderr
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -s $tmp
|
if test -s $tmp
|
||||||
if set -q log[1]
|
if test ! -z "$log"
|
||||||
nl -n ln -- $tmp > $log
|
nl -n ln -- $tmp > $log
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue