mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 15:30:40 +01:00
Added option to allow untracked files as non dirty
In this commit, the option only works for git but it should not be to hard for someone who knows svn to so the same. This commit is largely inspired by @yoavweiss, I only added an option to use it.
This commit is contained in:
@@ -15,7 +15,11 @@ parse_git_dirty() {
|
||||
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
|
||||
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
|
||||
fi
|
||||
GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
|
||||
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" != "true" ]]; then
|
||||
GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
|
||||
else
|
||||
GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1)
|
||||
fi
|
||||
if [[ -n $GIT_STATUS && "$GIT_STATUS" != "$CLEAN_MESSAGE" ]]; then
|
||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user