diff --git a/zsh/configs/prompt.zsh.local b/zsh/configs/prompt.zsh.local index 20a1e7c..a63fef4 100644 --- a/zsh/configs/prompt.zsh.local +++ b/zsh/configs/prompt.zsh.local @@ -29,3 +29,11 @@ setopt promptsubst # prompt export PROMPT='$(git_prompt_info)${SSH_CONNECTION+"%{$fg[yellow]%}%n@%m%{$reset_color%}:"}%{$fg_bold[blue]%}%2c%{$reset_color%} %{$fg_bold[cyan]%}❯%{$reset_color%} ' +export RPROMPT='%D{%K:%M:%S}' + +# update the prompt on carriage return +function _reset-prompt-and-accept-line { + zle reset-prompt + zle .accept-line +} +zle -N accept-line _reset-prompt-and-accept-line