zeesh/base/zeesh.zsh

16 lines
361 B
Bash

#cols=$(stty -a | grep -Po '(?<=columns )\d+' | tr -d "\n")
cols=$COLUMNS
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"
}