zeesh/base/zeesh.zsh

15 lines
346 B
Bash

cols=$(stty -a | grep -Po '(?<=columns )\d+' | tr -d "\n")
function ticker_message () {
if [[ $_zeeshdev_ticker_newlines == 0 ]]; then
printf "\r${(l:$cols:: :)A}\r"
printf "$@"
else
printf "$@\n"
fi
}
function ticker_finish () {
[[ $_zeeshdev_ticker_newlines == 0 ]] && printf "\r${(l:$cols:: :)A}\r"
}