diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-07 01:09:26 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-07 14:15:23 +0100 |
commit | e2761ab1784145e286ce51297071ce2a85ca0d19 (patch) | |
tree | 788a6cb990725775940b13166b6f661a6364e2b3 /01_Functions.zsh | |
parent | 2ad9e20123a840d5338ea2ad4c4684826cff3776 (diff) |
Better git status/colors codes managment.
Diffstat (limited to '01_Functions.zsh')
-rw-r--r-- | 01_Functions.zsh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh index aa96dea..809d85a 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -47,7 +47,7 @@ get_git_branch () { local my_git_branch - [ "$(git-ls-files . 2>&- | head -n 1)" == "" ] && return + [ "$( ( git-ls-tree HEAD . 2>&- ; git-ls-files . 2>&- ) | head -n 1)" == "" ] && return # Get current working GIT branch my_git_branch="$(git-branch 2>&- | grep -E '^\* ' | cut -c3-)" @@ -75,13 +75,13 @@ get_git_status () if ( echo ${(s:/:)PWD} | grep "\.\<git\>" >/dev/null ) then - my_git_status="$color[red];$color[bold]" + my_git_status="$COLOR_GIT_MANAGMENT" elif [ "$(git-diff --cached 2>&- | grep '^diff ')" != "" ] ; then - my_git_status="$color[yellow];$color[bold]" + my_git_status="$COLOR_GIT_CACHED" elif [ "$(git-ls-files -m 2>&-)" != "" ] ; then - my_git_status="$color[green];$color[bold]" + my_git_status="$COLOR_GIT_NOT_UP_TO_DATE" else - my_git_status="$color[blue]" + my_git_status="$COLOR_GIT_UP_TO_DATE" fi echo $my_git_status |