diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2007-09-25 16:24:11 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-07 14:15:18 +0100 |
commit | aba1f798c86b07247f2b725fdc5c0ee9e2a198be (patch) | |
tree | 65c4a327d5d5795297083a2e134a2d2f8ce5877b /11_Prompts.zsh | |
parent | 68f04afba2bfd7570aa9a34ef01b4bc87b0d1fb0 (diff) |
on-demand git-status (with M-g, and M-G to clear)
Diffstat (limited to '11_Prompts.zsh')
-rw-r--r-- | 11_Prompts.zsh | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/11_Prompts.zsh b/11_Prompts.zsh index a0a2feb..d3b4062 100644 --- a/11_Prompts.zsh +++ b/11_Prompts.zsh @@ -114,28 +114,6 @@ precmd () ERROR=%(? "$C_$COLOR_BAR$_C----" "%4>>"$C_$COLOR_ERRR$_C"%?$C_$COLOR_BAR$_C"---"%>>") errorsize=4 - ## GIT TRACKING ## - unset GITBRANCH - if [ "$GITCHECK" != "" ] - then - GITBRANCH=$(git branch 2>&- | grep -E '^\* ' | cut -c3-) - if [ "$GITBRANCH" != "" ] - then - preprint "Checking git status..." - _git_status=$(git-runstatus 2>&- | grep -E '^# ([[:alpha:]]+ )+(but not|to be)( [[:alpha:]]+)+:$') - if [ "$(grep "but not" <<< $_git_status)" != "" ] ; then - COLOR_GIT=$COLOR_NOT_UP_TODATE - elif [ "$(grep "to be committed" <<< $_git_status)" != "" ] ; then - COLOR_GIT=$COLOR_TOBE_COMMITED - else - COLOR_GIT=$COLOR_BRANCH_OR_REV - fi - - fi - fi - GitBranch=${GITBRANCH:+:$GITBRANCH} - GITBRANCH=${GITBRANCH:+$C_$COLOR_DOUBLEDOT$_C:$C_$COLOR_GIT$_C$GITBRANCH} - ## SVN TRACKING ## SVNREV=$(svn info 2>&- | grep '^RĂ©vision : ' | sed 's/^.* : /r/') if [ "$SVNREV" != "" ] @@ -184,6 +162,7 @@ precmd () chpwd() { which todo > /dev/null 2>&1 && todo + get_git_status } |