Make git branch yellow and change indicator red
This commit is contained in:
parent
3725d82a1e
commit
6522f86f37
1 changed files with 2 additions and 2 deletions
4
zshrc
4
zshrc
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue