From 984ec07c30adfe349504e2ec3071358bdb5e6d8f Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Sun, 15 Jun 2008 08:08:42 +0300 Subject: branch display replaced with symbolic head from `git-name-rev HEAD` --- prompt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'prompt') diff --git a/prompt b/prompt index da029e4..d10ac3b 100755 --- a/prompt +++ b/prompt @@ -236,7 +236,13 @@ PROMPT_COMMAND=' front=7 head=${PWD:0:$front}"..." - # LOCAL + # LOCALS + # SVN + # ... + + # make + # ... + # GIT git_dir=`git-rev-parse --git-dir 2> /dev/null` if [[ $git_dir ]]; then @@ -318,9 +324,13 @@ PROMPT_COMMAND=' : ${status?prompt internal error: git status} eval git_color="\${git_$status}" + ### head + set `git-name-rev HEAD` + head="$2" + ### compose local label [[ $clean == "clean" ]] || sep=":" - tail_local="$branch${op+/$op}$sep$git_added$git_added_files$git_modified$git_modified_files$git_untracked$git_untracked_files$git_color" + tail_local="$head${op+/$op}$sep$git_added$git_added_files$git_modified$git_modified_files$git_untracked$git_untracked_files$git_color" ### fringes head_local="${head_local+$git_color $head_local\n}" -- cgit v1.2.3