diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-06-15 08:36:08 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-06-15 08:36:08 +0300 |
commit | bcc7139ca39abb9925eef7d26d8907a3a77c6f4c (patch) | |
tree | b1f4330ef58216f359ef800163e356fd39da5ecf /prompt | |
parent | branch display replaced with symbolic head from `git-name-rev HEAD` (diff) | |
download | git-prompt-bcc7139ca39abb9925eef7d26d8907a3a77c6f4c.tar.gz git-prompt-bcc7139ca39abb9925eef7d26d8907a3a77c6f4c.tar.bz2 git-prompt-bcc7139ca39abb9925eef7d26d8907a3a77c6f4c.zip |
also added raw head disp
Diffstat (limited to 'prompt')
-rwxr-xr-x | prompt | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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 |