Skip to content

Instantly share code, notes, and snippets.

@ravicious
Created July 8, 2019 17:20
Show Gist options
  • Save ravicious/94f941a50f927262db8cdb494068f0a5 to your computer and use it in GitHub Desktop.
Save ravicious/94f941a50f927262db8cdb494068f0a5 to your computer and use it in GitHub Desktop.
Time in ZSH prompt
RPROMPT="%{$fg[white]%}[%*]%{$reset_color%}"
# Reset the prompt before accepting the line.
# https://stackoverflow.com/a/35051172
function _reset-prompt-and-accept-line {
zle reset-prompt
zle .accept-line # Note the . meaning the built-in accept-line.
}
zle -N accept-line _reset-prompt-and-accept-line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment