From 9e4f9a84258649aa061f145903ae1681af64814d Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Fri, 23 Nov 2012 08:36:17 +0100 Subject: .bash_prompt: Fix `parse_git_dirty` for Git v1.8.0+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git 1.8.0+ says “nothing to commit (working directory clean)”. Older Git versions return “nothing to commit (working directory clean)”. Thanks to @nicolahery in #143 for the suggestion. --- .bash_prompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.bash_prompt') diff --git a/.bash_prompt b/.bash_prompt index 2ce0bed..110c926 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -44,7 +44,7 @@ export BOLD export RESET function parse_git_dirty() { - [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" + [[ $(git status 2> /dev/null | tail -n1) != *"working directory clean"* ]] && echo "*" } function parse_git_branch() { -- cgit v1.2.3