From f4982398816e2dee92e0f7483b0c2c3456c3ec8d Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 2 Mar 2012 12:36:52 +0100 Subject: [Prompts] Woaw.. Et voilà ! Now it colorizes only the *EFFECTIVE* git hash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 01_Internal.zsh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to '01_Internal.zsh') diff --git a/01_Internal.zsh b/01_Internal.zsh index f11a2bc..b8bec64 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -164,6 +164,8 @@ __get_git_branch () fi fi + my_git_branch="→"$my_git_branch"←" + # Rebase in progress ? if [ -d $GIT_DIR/rebase-merge -o -d $GIT_DIR/rebase-apply ] then @@ -187,7 +189,6 @@ __get_git_branch () last=$(cat $REBASE_DIR/last) fi - # Then the result my_git_branch="[$current/$last: "$(git name-rev --name-only "$(cat $REBASE_DIR/onto 2>/dev/null)" 2>/dev/null | __cleanup_git_branch_name)".."$(echo $my_git_branch)"]" [ -r $REBASE_DIR/head-name ] && my_git_branch=$my_git_branch" "$(< $REBASE_DIR/head-name sed 's/^refs\///;s/^heads\///') else @@ -195,11 +196,6 @@ __get_git_branch () [ ! "$checkouted_branch" ] && my_git_branch="($my_git_branch)" fi - if [ "$(git status 2>&- | grep "new file" | head -n1)" != "" ] ; then - # ADDED FILES - my_git_branch=$my_git_branch - fi - echo " "$my_git_branch } -- cgit v1.2.3