From 7cffacff4514316d2028068fe0825f8e1ec8b5a9 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 24 Feb 2012 12:58:25 +0100 Subject: [Prompts] get rids of annoying get_git_status breaks which concatenated paths & git_branch --- 01_Internal.zsh | 4 ++-- 12_Prompts.zsh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/01_Internal.zsh b/01_Internal.zsh index 78832c3..e8a27c8 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -127,7 +127,7 @@ __get_git_branch () my_git_branch=$(grep merge .repo/manifests.git/config | awk '{print $3}') if [ $my_git_branch != "" ] then - echo "[$my_git_branch]" + echo " [$my_git_branch]" return fi fi @@ -198,7 +198,7 @@ __get_git_branch () my_git_branch=$my_git_branch fi - echo $my_git_branch + echo " "$my_git_branch } __get_guilt_series () diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 615b39f..3664b2b 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -323,7 +323,7 @@ __update_prompt_elements() # then we reduce the path until it reaches the last path element, spaceleft=$(($spaceleft - $GITBRANCHSIZE)) [ $spaceleft -lt $minimalpathsize ] && spaceleft=$minimalpathsize - GITBRANCH=${GITBRANCH:+ $C_"$(__get_git_status)"$_C$GITBRANCH}"$(__get_guilt_series)$C_$color[none]$_C" + GITBRANCH=${GITBRANCH:+$C_"$(__get_git_status)"$_C$GITBRANCH}"$(__get_guilt_series)$C_$color[none]$_C" CURDIR="$C_$_prompt_colors[path]$_C%`echo $spaceleft`<..<"$MY_PATH"%<<$C_$color[none]$_C" [ "$DEBUG" = "yes" ] && echo } -- cgit v1.2.3