From e7b4dac58d95d37d20a8644970d7646d7f342244 Mon Sep 17 00:00:00 2001 From: JuanPablo Date: Sun, 7 Aug 2011 16:29:55 -0400 Subject: [PATCH] show arrow when exist local commits to push --- themes/pixelmuerto.zsh-theme | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/pixelmuerto.zsh-theme b/themes/pixelmuerto.zsh-theme index 831c38d00..21694af7a 100644 --- a/themes/pixelmuerto.zsh-theme +++ b/themes/pixelmuerto.zsh-theme @@ -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 -Uz vcs_info @@ -43,12 +44,12 @@ function git_remotes() { (git fetch $remote >& /dev/null &) fi done + pushed=$(git log --oneline origin/master..HEAD | wc -l ) + [ "$pushed" -gt "0" ] && remotes+="↑:"$pushed fi fi 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%}' precmd () {