1
0
mirror of https://github.com/danbee/dotfiles-local synced 2025-03-04 08:49:07 +00:00

Add time to ZSH prompt and update on command

This commit is contained in:
Daniel Barber 2018-11-28 12:55:51 -05:00
parent 9100a789ea
commit eb429182ca
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -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