Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ZSH: Show timestamp of command issued in prompt
# Show timestamp whan a command was issued on the right prompt
RPROMPT='[%D{%f.%m. %H:%M:%S}]'
TMOUT=1
TRAPALRM() {
zle reset-prompt
}
# inspired by https://stackoverflow.com/questions/13125825/zsh-update-prompt-with-current-time-when-a-command-is-started
# tweaked format of timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.