show arrow when exist local commits to push

This commit is contained in:
JuanPablo 2011-08-07 16:29:55 -04:00
commit e7b4dac58d

View file

@ -1,4 +1,5 @@
# inspirated in { kolo alanpeabody microtech }.zsh-theme # inspirated in { kolo alanpeabody nanotech }.zsh-theme
# inspirated in https://github.com/lvv/git-prompt
autoload -U colors && colors autoload -U colors && colors
autoload -Uz vcs_info autoload -Uz vcs_info
@ -43,12 +44,12 @@ function git_remotes() {
(git fetch $remote >& /dev/null &) (git fetch $remote >& /dev/null &)
fi fi
done done
pushed=$(git log --oneline origin/master..HEAD | wc -l )
[ "$pushed" -gt "0" ] && remotes+="↑:"$pushed
fi fi
fi fi
echo $remotes echo $remotes
} }
# TODO if commits to push show this number
# TODO show arrow when push is necessary
local remotes='%B%F{green}$(git_remotes)%{$reset_color%}' local remotes='%B%F{green}$(git_remotes)%{$reset_color%}'
precmd () { precmd () {