Added color to git rprompt
This commit is contained in:
4
zshrc
4
zshrc
@@ -111,7 +111,9 @@ function rprompt-git-current-branch {
|
|||||||
action=`VCS_INFO_git_getaction "$gitdir"` && action="($action)"
|
action=`VCS_INFO_git_getaction "$gitdir"` && action="($action)"
|
||||||
|
|
||||||
st=`git status 2> /dev/null`
|
st=`git status 2> /dev/null`
|
||||||
if [[ -n `echo "$st" | grep "^nothing to"` ]]; then
|
if [[ -n `echo "$st" | grep "ahead of"`]]; then
|
||||||
|
color=%F{white}
|
||||||
|
elif[[ -n `echo "$st" | grep "^nothing to"` ]]; then
|
||||||
color=%F{green}
|
color=%F{green}
|
||||||
elif [[ -n `echo "$st" | grep "^no changes added"` ]]; then
|
elif [[ -n `echo "$st" | grep "^no changes added"` ]]; then
|
||||||
color=%F{yellow}
|
color=%F{yellow}
|
||||||
|
Reference in New Issue
Block a user