zsh: bell when a long command finishes

This commit is contained in:
ewin 2025-03-28 07:53:10 -04:00
parent 367d6764d0
commit d8802346ea
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc

View file

@ -77,6 +77,11 @@ function build_rprompt {
timer_show=$(printf '%.*f\n' 3 $timer_show) timer_show=$(printf '%.*f\n' 3 $timer_show)
RPROMPT="took %B%F{cyan}${timer_show}s%f%b, $RPROMPT" RPROMPT="took %B%F{cyan}${timer_show}s%f%b, $RPROMPT"
fi fi
# if the command took a *really* long time, play a bell when it's
# done
if [[ $(($now - $rprompt_exec_timer)) > 15 ]]; then
tput bel
fi
fi fi
fi fi