This commit is contained in:
2026-01-09 13:42:29 +01:00
parent 1ba9b4ba52
commit bc827535b9

View File

@@ -2,6 +2,14 @@
spinner_pid= spinner_pid=
usage() {
local name=${0##*/}
cat <<-EOF
Usage: ${name} {options] <cmd>
Run a command with an animated spinner.
EOF
}
spinner() { spinner() {
local chars=('\' '|' '/' '-') local chars=('\' '|' '/' '-')
local c local c
@@ -29,7 +37,7 @@ main() {
spinner_pid=$! spinner_pid=$!
if (( $# == 0)); then if (( $# == 0)); then
echo "Usage: spinner <cmd>" usage >&2
return 1 return 1
fi fi
"$@" "$@"