# HG changeset patch # User Zeger Van de Vannet # Date 1643194712 -3600 # Node ID f10b89e9aff3103cd4ccae34fca2d585b86385d7 # Parent aee830df7a88d672cd7b0532895e92bf4f5b8923 Add git/hg info to zsh prompt diff -r aee830df7a88 -r f10b89e9aff3 dot_zshrc --- 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