From 44ef72305430c7b2b97f7b8f903be7dbdbe6311b Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 27 Jul 2012 10:31:00 +0200 Subject: [Git] corrects 966f82cb0: stashing. --- 01_Internal.zsh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to '01_Internal.zsh') diff --git a/01_Internal.zsh b/01_Internal.zsh index 74afa9f..fa4fd2e 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -216,12 +216,16 @@ __get_git_branch () if [ "$(git rev-parse --is-inside-git-dir)" != "true" -a "$(git config --get core.bare)" != "true" ] then local _stashed=$(git stash list | wc -l ) - [ "$_stashed" -gt 0 ] && my_git_branch+=$C_$_prompt_colors[soft_generic]$_C - [ "$_stashed" -gt 0 ] && for i in {2..$_stashed} - do - my_git_branch+="·" - done - my_git_branch+="$C_$color[blink];$_prompt_colors[soft_generic]$_C·" + if [ "$_stashed" -gt 0 ] + then + my_git_branch+=$C_$_prompt_colors[soft_generic]$_C + while [ $i -gt 1 ] + do + my_git_branch+="·" + i=$(( $i - 1 )) + done + my_git_branch+="$C_$color[blink];$_prompt_colors[soft_generic]$_C·" + fi fi echo $my_git_branch -- cgit v1.2.3