mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
pixelmuerto theme : git status not in .git dir
This commit is contained in:
parent
b39770cc89
commit
b72a37528c
1 changed files with 5 additions and 3 deletions
|
|
@ -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%}'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue