summaryrefslogtreecommitdiff
path: root/11_Prompts.zsh
diff options
context:
space:
mode:
Diffstat (limited to '11_Prompts.zsh')
-rw-r--r--11_Prompts.zsh18
1 files changed, 9 insertions, 9 deletions
diff --git a/11_Prompts.zsh b/11_Prompts.zsh
index 37e15d8..a10f260 100644
--- a/11_Prompts.zsh
+++ b/11_Prompts.zsh
@@ -112,16 +112,16 @@ precmd ()
then
print -n "Checking git status...\r"
_git_status=$(git-runstatus 2>&- | grep -E '^# ([[:alpha:]]+ )+(but not|to be)( [[:alpha:]]+)+:$')
- if [ "$(grep "to be committed" <<< $_git_status)" != "" ]
- then
- COLOR_GIT=$COLOR_TOBE_COMMITED
- elif [ "$(grep "but not" <<< $_git_status)" != "" ]
- COLOR_GIT=$COLOR_NOT_UP_TODATE
- else
- COLOR_GIT=$COLOR_BRANCH_OR_REV
+ if [ "$(grep "to be committed" <<< $_git_status)" != "" ] ; then
+ COLOR_GIT=$COLOR_TOBE_COMMITED
+ elif [ "$(grep "but not" <<< $_git_status)" != "" ] ; then
+ COLOR_GIT=$COLOR_NOT_UP_TODATE
+ else
+ COLOR_GIT=$COLOR_BRANCH_OR_REV
+ fi
+
+ GITBRANCH=$C_$COLOR_DOUBLEDOT$_C:$C_$COLOR_GIT$_C$GITBRANCH
fi
-
- GITBRANCH=$C_$COLOR_DOUBLEDOT$_C:$C_$COLOR_GIT$_C$GITBRANCH
fi
## SVN TRACKING ##