Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Wolf Software Logo
Bash Spinner

Build Status Release Commits since release Software License

Overview

Display a small progress spinner in bash while running your commands with optional message.

This can be used for anything that takes time.

Simple (Static) Example

This example passes a static string to start_spinner which remains in place until stop_spinner is called.

source spinner.sh

start_spinner "This is my cool spinner message"
sleep 10

stop_spinner

Dynamic Example

This example passes a command to start_spinner_eval which will be re-evaluated each time the spinner is drawn until stop_spinner is called.

source spinner.sh

start_spinner_eval 'cat log | tail -1'

for i in {1..10}; do
    echo "Iteration number ${i}" >> log
    sleep 1
done

stop_spinner

Config

You can set an environment value called SPINNER_DELAY to change the default (0.25 seconds) delay used when drawing the spinner.

Contributors

Show Support

About

Display a small progress spinner in bash while running your commands with optional message.

Topics

Resources

License

Sponsor this project

Packages

No packages published

Languages