1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 23:00:09 +00:00

Adding a fix for the DISABLE_UNTRACKED_FILES_DIRTY option.

This commit is contained in:
Christopher Roach 2013-05-19 12:55:10 -07:00
parent 27c6becffd
commit 4ff861ee11

View file

@ -15,12 +15,12 @@ parse_git_dirty() {
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" != "true" ]]; then
GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
else
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1)
else
GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
fi
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null) ]]; then
if [[ -n $GIT_STATUS ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"