pixelmuerto theme : git status not in .git dir

This commit is contained in:
JuanPablo 2011-09-13 12:56:22 -03:00
commit b72a37528c

View file

@ -46,11 +46,13 @@ function git_remotes() {
done done
pushed=$(git log --oneline origin/master..HEAD | wc -l ) pushed=$(git log --oneline origin/master..HEAD | wc -l )
[ "$pushed" -gt "0" ] && remotes+=" ↑:"$pushed [ "$pushed" -gt "0" ] && remotes+=" ↑:"$pushed
# submodules commints if [[ "$git_dir" != "." ]]; then
# submodules commits
submod=$(git status | grep "new commits" | wc -l) submod=$(git status | grep "new commits" | wc -l)
[ "$submod" -gt "0" ] && remotes+=" _:"$submod [ "$submod" -gt "0" ] && remotes+=" _:"$submod
fi fi
fi fi
fi
echo $remotes echo $remotes
} }
local remotes='%B%F{green}$(git_remotes)%{$reset_color%}' local remotes='%B%F{green}$(git_remotes)%{$reset_color%}'