diff --git a/bashtools.sh b/bashtools.sh index ed46da5..2cb6551 100755 --- a/bashtools.sh +++ b/bashtools.sh @@ -40,6 +40,7 @@ if [[ $1 != "reload" && -n $HAVE_BASHTOOLS ]]; then return fi export HAVE_BASHTOOLS=1 +trap bashtools_cleanup INT SPINDELAY=0.05 # delay in ms between spinner frames SPINNERFRAMES='|/-\' @@ -152,6 +153,12 @@ function info() { csecho "${INFOCOL}" "^b>>^p $*" >/dev/stderr } +function bashtools_cleanup() { + stop_spinner + innotify=0 + echo -e "$PLAIN" +} + function ok() { local msg=${*:-ok} stop_spinner