2015-12-18 09:45:36 -05:00
|
|
|
# slightly modified parse_git_dirty from oh-my-zsh for theme compatibility
|
|
|
|
# not supporting git < 1.7.2; upgrade your shit
|
|
|
|
|
|
|
|
local STATUS=''
|
|
|
|
local FLAGS=('--porcelain' '--ignore-submodules=dirty')
|
|
|
|
if [[ ${zgit_hide_prompt} != 'true' ]]; then
|
2015-12-19 09:48:29 -05:00
|
|
|
if [[ "${zgit_disable_untracked_dirty}" == "true" ]]; then
|
2015-12-18 09:45:36 -05:00
|
|
|
FLAGS+='--untracked-files=no'
|
|
|
|
fi
|
|
|
|
STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1)
|
|
|
|
fi
|
2015-12-19 09:48:29 -05:00
|
|
|
if [[ -n ${STATUS} ]]; then
|
2015-12-18 09:45:36 -05:00
|
|
|
print ${ZSH_THEME_GIT_PROMPT_DIRTY}
|
|
|
|
else
|
|
|
|
print ${ZSH_THEME_GIT_PROMPT_CLEAN}
|
|
|
|
fi
|