Make git branch yellow and change indicator red

This commit is contained in:
Eryn Wells 2012-03-21 10:07:36 -07:00
parent 3725d82a1e
commit 6522f86f37

4
zshrc
View file

@ -62,10 +62,10 @@ precmd_git_rprompt()
fi
branch=`echo $gstat | sed -n -e '2,$d' \
-e 's/.*\ \([^\ ^:\\*?\[]*\)$/\1/p'`
RPROMPT="$branch"
RPROMPT="%F{yellow}$branch%f"
echo $gstat | grep '^nothing' 1>/dev/null 2>&1
if [[ $? != 0 ]]; then
RPROMPT="%B%F{green}*%f%b$RPROMPT"
RPROMPT="%B%F{red}*%f%b$RPROMPT"
fi
}