7 ms·
It looks like zsh can handle updating the time in the prompt quite simply and elegantly.
by countermeasure 6y ago
It looks like zsh can handle updating the time in the prompt quite simply and elegantly.
- mikelward 6y agoYes, I find that solution much simpler.
- Symbiote 6y agoIt keeps the clock up-to-date, but I use Konsole's "monitor for activity" feature, which changes the colour of inactive tabs if there is output. Instead, this seems to work: TRAPDEBUG() { case "$WIDGET" in zle-line-finish) zle reset-prompt ;; *) ;; esac } (I don't know if further cases will be required.) This updates the prompt after "enter" is pressed, but before the command is executed.