Created
July 26, 2019 07:26
-
-
Save madmas/f5d8b4078f60351c07f3f89de0344462 to your computer and use it in GitHub Desktop.
ZSH: Show timestamp of command issued in prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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