From b72a37528c2a54309e2fbca1bd57e36eeb9d28ce Mon Sep 17 00:00:00 2001 From: JuanPablo Date: Tue, 13 Sep 2011 12:56:22 -0300 Subject: [PATCH] pixelmuerto theme : git status not in .git dir --- themes/pixelmuerto.zsh-theme | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/pixelmuerto.zsh-theme b/themes/pixelmuerto.zsh-theme index 9fac1c2cb..3e52a090d 100644 --- a/themes/pixelmuerto.zsh-theme +++ b/themes/pixelmuerto.zsh-theme @@ -46,9 +46,11 @@ function git_remotes() { done pushed=$(git log --oneline origin/master..HEAD | wc -l ) [ "$pushed" -gt "0" ] && remotes+=" ↑:"$pushed - # submodules commints - submod=$(git status | grep "new commits" | wc -l) - [ "$submod" -gt "0" ] && remotes+=" _:"$submod + if [[ "$git_dir" != "." ]]; then + # submodules commits + submod=$(git status | grep "new commits" | wc -l) + [ "$submod" -gt "0" ] && remotes+=" _:"$submod + fi fi fi echo $remotes