From e679734f4cb152400cd60f8285f8f325bc530786 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 1 Aug 2013 15:15:28 +0200 Subject: [Git] Better ahead/behind/diverged managment (part 2) --- 01_Internal.zsh | 21 +++++++++++++-------- 11_Colors.zsh | 3 ++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/01_Internal.zsh b/01_Internal.zsh index 222e761..b1aef67 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -228,13 +228,13 @@ __get_git_branch () then # ↙ ↯ ↲ ↵ local _stash="↙" - my_git_branch+=" "$C_$_prompt_colors[soft_generic]$_C - while [ $_stashed -gt 1 ] - do - my_git_branch+=$_stash - _stashed=$(( $_stashed - 1 )) - done - my_git_branch+="$C_$_prompt_colors[bold_generic];$color[white]$_C"$_stash + #my_git_branch+=" "$C_$_prompt_colors[soft_generic]$_C + #while [ $_stashed -gt 1 ] + #do + # my_git_branch+=$_stash + # _stashed=$(( $_stashed - 1 )) + #done + my_git_branch+=" $C_$_gcl_colors[white]$_C"$_stash fi fi __debug @@ -268,7 +268,12 @@ __get_git_branch () fi if [ $_ahead -gt 0 ] then - my_git_branch+=$C_$_gcl_colors[cached]$_C + if [ $_behind -gt 0 ] + then + my_git_branch+=$C_$_prompt_colors[generic]$_C + else + my_git_branch+=$C_$_gcl_colors[cached]$_C + fi my_git_branch+="⬆" [ $_ahead -gt 1 ] && my_git_branch+="$(echo $_ahead | _subscript_number)" fi diff --git a/11_Colors.zsh b/11_Colors.zsh index ada1fdb..dd26149 100644 --- a/11_Colors.zsh +++ b/11_Colors.zsh @@ -81,10 +81,11 @@ __set_prompt_colors () _gcl_colors[init]="$color[black];$color[bold]" _gcl_colors[gitdir]="$color[red];$color[bold]" _gcl_colors[uptodate]="$_prompt_colors[generic]" + _gcl_colors[merging]="$color[bg-black]" _gcl_colors[changed]="$color[green]" _gcl_colors[cached]="$color[yellow];$color[bold]" _gcl_colors[mixed]="$color[green];$color[bold]" - _gcl_colors[merging]="$color[bg-black]" + _gcl_colors[stashes]="$color[white]" _gcl_colors[ffwd]="$color[red];$color[bold]" _gcl_colors[diverged]="$color[black];$color[bold]" -- cgit v1.2.3