Skip to content

Instantly share code, notes, and snippets.

@madmas
Created July 26, 2019 07:26
Show Gist options
  • Save madmas/f5d8b4078f60351c07f3f89de0344462 to your computer and use it in GitHub Desktop.
Save madmas/f5d8b4078f60351c07f3f89de0344462 to your computer and use it in GitHub Desktop.
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