From 89540d312543b897b3c116370deabdfe9db15dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Schmidts?= Date: Wed, 22 Jan 2014 16:08:21 +0100 Subject: [PATCH] replacing replacing "git status" option "--short" by "--porcelain" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The behavior of porcelain seems more adapted to the liquidprompt usage From the "git status" documentation : The porcelain format is similar to the short format, but is guaranteed not to change in a backwards-incompatible way between git versions or based on user configuration. This makes it ideal for parsing by scripts. The description of the short format above also describes the porcelain format, with a few exceptions: 1. The user’s color.status configuration is not respected; color will always be off. [...] --- liquidprompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquidprompt b/liquidprompt index c797778..13d010b 100755 --- a/liquidprompt +++ b/liquidprompt @@ -710,7 +710,7 @@ _lp_git_branch_color() local end end="$NO_COL" - if LC_ALL=C \git status -s 2>/dev/null | grep -Eq '^\?\?'; then + if LC_ALL=C \git status --porcelain 2>/dev/null | grep -Eq '^\?\?'; then end="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED$end" fi