From bcc7139ca39abb9925eef7d26d8907a3a77c6f4c Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Sun, 15 Jun 2008 08:36:08 +0300 Subject: also added raw head disp --- prompt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'prompt') diff --git a/prompt b/prompt index d10ac3b..17959be 100755 --- a/prompt +++ b/prompt @@ -276,8 +276,6 @@ PROMPT_COMMAND=' " ` - - ### OP unset op @@ -325,16 +323,17 @@ PROMPT_COMMAND=' eval git_color="\${git_$status}" ### head - set `git-name-rev HEAD` - head="$2" + head=`git-name-rev --name-only HEAD` + head_rev=`git-rev-parse HEAD` + head_rev=${head_rev:0:6} ### compose local label [[ $clean == "clean" ]] || sep=":" - tail_local="$head${op+/$op}$sep$git_added$git_added_files$git_modified$git_modified_files$git_untracked$git_untracked_files$git_color" + tail_local="($head $white$head_rev${op+ / $op}$git_color)$sep$git_added$git_added_files$git_modified$git_modified_files$git_untracked$git_untracked_files$git_color" - ### fringes + ### fringes (added depended on location) head_local="${head_local+$git_color $head_local\n}" - tail_local="${tail_local+$git_color ($tail_local)}${dir_color}" + tail_local="${tail_local+$git_color $tail_local}${dir_color}" unset branch status git_color clean added modified untracked sep unset git_modified_files -- cgit v1.2.3