diff options
author | Sebastien Varrette <Sebastien.Varrette@uni.lu> | 2016-02-08 19:14:28 +0300 |
---|---|---|
committer | Sebastien Varrette <Sebastien.Varrette@uni.lu> | 2016-02-08 19:14:28 +0300 |
commit | 56bc1b3f47e4dbe72ef13a3227dd90682c6dbea8 (patch) | |
tree | b22357689c61231dfa193fb1164a8e5f2ab9f483 /functions/vcs.zsh | |
parent | 1a05542901d32ef897090915f0daee7d2300eb42 (diff) |
dirty check even in subdirs
Signed-off-by: Sebastien Varrette <Sebastien.Varrette@uni.lu>
Diffstat (limited to 'functions/vcs.zsh')
-rw-r--r-- | functions/vcs.zsh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh index b23b8330..cf980d23 100644 --- a/functions/vcs.zsh +++ b/functions/vcs.zsh @@ -7,8 +7,12 @@ ################################################################ function +vi-git-untracked() { + local FLAGS + FLAGS=('--porcelain') + # TODO: check git >= 1.7.2 + FLAGS+='--ignore-submodules=dirty' if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \ - -n $(git ls-files --others --exclude-standard | sed q) ]]; then + -n $(git status ${FLAGS} 2> /dev/null | tail -n1) ]]; then hook_com[unstaged]+=" %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_UNTRACKED_ICON')%f" VCS_WORKDIR_HALF_DIRTY=true else |