From 8ea9caea90c3781bc2b529df339c6552daef00b4 Mon Sep 17 00:00:00 2001 From: Cassiano Leal Date: Sun, 14 Sep 2014 12:23:44 +0100 Subject: [PATCH] Fix #3126 - Use the --porcelain flag instead of grepping out the branch information --- lib/git.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index b6674da9d..5a5208c17 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -18,9 +18,9 @@ parse_git_dirty() { SUBMODULE_SYNTAX="--ignore-submodules=dirty" fi 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 - 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 if [[ -n $GIT_STATUS ]]; then echo "$ZSH_THEME_GIT_PROMPT_DIRTY"