mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Fix #3126 - Use the --porcelain flag instead of grepping out the branch information
This commit is contained in:
parent
ff0e50c086
commit
8ea9caea90
1 changed files with 2 additions and 2 deletions
|
|
@ -18,9 +18,9 @@ parse_git_dirty() {
|
||||||
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
|
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
|
||||||
fi
|
fi
|
||||||
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
||||||
GIT_STATUS=$(command git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | grep -v '^##' | tail -n1)
|
GIT_STATUS=$(command git status --porcelain ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1)
|
||||||
else
|
else
|
||||||
GIT_STATUS=$(command git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | grep -v '^##' | tail -n1)
|
GIT_STATUS=$(command git status --porcelain ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
|
||||||
fi
|
fi
|
||||||
if [[ -n $GIT_STATUS ]]; then
|
if [[ -n $GIT_STATUS ]]; then
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue