diff --git a/.subzsh/prompt b/.subzsh/prompt index c157a00..552d7f7 100644 --- a/.subzsh/prompt +++ b/.subzsh/prompt @@ -32,13 +32,22 @@ zstyle ':vcs_info:*' enable git cvs svn zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' unstagedstr '!' zstyle ':vcs_info:*' stagedstr '+' +zstyle ':vcs_info:git*+set-message:*' hooks git-untracked + ++vi-git-untracked(){ + if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \ + git status --porcelain | grep '??' &> /dev/null ; then + hook_com[staged]+='?' + fi +} + precmd() { vcs_info } zstyle ':vcs_info:*' actionformats \ - '%F{5}(%f%s%F{5})%F{3}-%u%c%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' + '%F{5}(%f%s%F{5})%F{3}%u%c%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' zstyle ':vcs_info:*' formats \ - '%F{5}(%f%s%F{5})%F{3}-%u%c%F{5}[%F{2}%b%F{5}]%f ' + '%F{5}(%f%s%F{5})%F{3}%u%c%F{5}[%F{2}%b%F{5}]%f ' zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'