about summary refs log tree commit diff
path: root/Misc/vcs_info-examples
diff options
context:
space:
mode:
Diffstat (limited to 'Misc/vcs_info-examples')
-rw-r--r--Misc/vcs_info-examples2
1 files changed, 1 insertions, 1 deletions
diff --git a/Misc/vcs_info-examples b/Misc/vcs_info-examples
index edb0760d1..c2b02a2ac 100644
--- a/Misc/vcs_info-examples
+++ b/Misc/vcs_info-examples
@@ -160,7 +160,7 @@ 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
+        git status --porcelain | grep -q '^?? ' 2> /dev/null ; then
         # This will show the marker if there are any untracked files in repo.
         # If instead you want to show the marker only if there are untracked
         # files in $PWD, use: