summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--11_Prompts.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/11_Prompts.zsh b/11_Prompts.zsh
index 1f5475f..e1b759b 100644
--- a/11_Prompts.zsh
+++ b/11_Prompts.zsh
@@ -120,9 +120,10 @@ precmd ()
COLOR_GIT=$COLOR_BRANCH_OR_REV
fi
- GITBRANCH=$C_$COLOR_DOUBLEDOT$_C:$C_$COLOR_GIT$_C$GITBRANCH
fi
fi
+ GitBranch=${GITBRANCH:+:$GITBRANCH}
+ GITBRANCH=${GITBRANCH:+$C_$COLOR_DOUBLEDOT$_C:$C_$COLOR_GIT$_C$GITBRANCH}
## SVN TRACKING ##
SVNREV=$(svn info 2>&- | grep '^RĂ©vision : ' | sed 's/^.* : /r/')
@@ -154,7 +155,7 @@ precmd ()
MY_PATH="%(!.%d.%~)"
pathsize=`print -Pn $MY_PATH`
pathsize=${#pathsize}
- spaceleft=`print -Pn "%n@%m $GITBRANCH %#-ls -laCdtrux-[ $DATE ]-"`
+ spaceleft=`print -Pn "%n@%m $GitBranch %#-ls -laCdtrux-[ $DATE ]-"`
spaceleft=$(($COLUMNS - ${#spaceleft}))
minimalsize=`print -Pn "%1~"`
minimalsize=$((3 + ${#minimalsize}))