Mercurial > dotfiles
diff dot_zshrc @ 535:f10b89e9aff3
Add git/hg info to zsh prompt
author | Zeger Van de Vannet <zegervdv@me.com> |
---|---|
date | Wed, 26 Jan 2022 11:58:32 +0100 |
parents | aee830df7a88 |
children | 87f5a409ee83 |
line wrap: on
line diff
--- a/dot_zshrc Wed Jan 26 09:37:15 2022 +0100 +++ b/dot_zshrc Wed Jan 26 11:58:32 2022 +0100 @@ -58,7 +58,16 @@ return $(( 128 + $1 )) } -RPROMPT='${vim_mode}' +autoload -Uz vcs_info +zstyle ':vcs_info:*' enable git hg + +zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' +zstyle ':vcs_info:*' formats '%F{4}%s%F{5}%F{3} @ %F{2}%b%f' +zstyle ':vcs_info:hg*:*' use-simple true + +precmd () { vcs_info } + +RPROMPT='${vcs_info_msg_0_} ${vim_mode}' zmodload -i zsh/complist