From 71140e8b17be9bae39bee7308a1da488197ceb9b Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 6 Apr 2015 20:17:49 +0200 Subject: [PATCH] Added color to git rprompt --- zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 8f0c931..2ba7067 100644 --- a/zshrc +++ b/zshrc @@ -111,7 +111,9 @@ function rprompt-git-current-branch { action=`VCS_INFO_git_getaction "$gitdir"` && action="($action)" 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} elif [[ -n `echo "$st" | grep "^no changes added"` ]]; then color=%F{yellow}