56e835426bc895a191540d4d640b7750a81ff23a
- Author
- Philip Stark <git@codechaos.ch>
- Committer
- Philip Stark <git@codechaos.ch>
- Date
Message
fix git_prompt_status() to not say the repository has untracked files all the time
Diff
1diff --git a/lib/git.zsh b/lib/git.zsh
2index 3e14695bd389f01265d8dcf90587a74f4767030c..5cbd819f8c4a0aec514bfbb4d38db339e7672b24 100644
3--- a/lib/git.zsh
4+++ b/lib/git.zsh
5@@ -62,7 +62,7 @@ function git_prompt_long_sha() {
6 git_prompt_status() {
7 INDEX=$(git status --porcelain -b 2> /dev/null)
8 STATUS=""
9- if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
10+ if $(echo "$INDEX" | grep '^\?\? ' &> /dev/null); then
11 STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
12 fi
13 if $(echo "$INDEX" | grep '^A ' &> /dev/null); then