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:
parent
9100a789ea
commit
eb429182ca
@ -29,3 +29,11 @@ setopt promptsubst
|
|||||||
|
|
||||||
# prompt
|
# 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 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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user