summaryrefslogtreecommitdiff
path: root/11_Prompts.zsh
diff options
context:
space:
mode:
authorhugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913>2007-08-09 12:22:42 +0000
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:17 +0100
commitc8b28b026b8bac4e3a87031145e63c3d3ee36ff8 (patch)
treedb394086fc0e462213b5d2be917e772eb4f35dde /11_Prompts.zsh
parentb666d86a21ef269b5c7b9aba49f0730218b97a2f (diff)
promptsize better calculated..
git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@535 a0e5b806-a6f9-0310-978d-cbce73f8a913
Diffstat (limited to '11_Prompts.zsh')
-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}))