summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2013-08-01 15:15:28 +0200
committerHugues Hiegel <hugues.hiegel@qosmos.com>2013-08-02 12:52:57 +0200
commite679734f4cb152400cd60f8285f8f325bc530786 (patch)
treecc5fd00a62a772644438b9d92e45e617f07d4643
parent90f118fd8ed2e8958c55b3726354c3849e96a1cc (diff)
[Git] Better ahead/behind/diverged managment (part 2)
-rw-r--r--01_Internal.zsh21
-rw-r--r--11_Colors.zsh3
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]"