From ce7ad3ffeb164cf993baf211e91797fca97e1b88 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Sat, 31 Dec 2016 00:52:07 -0800 Subject: [PATCH] Fix bug with git bash prompt With git 2.9.3 uses the word tree instead of directory. This would mean the dirty git flag was always showing in the bash prompt. Now look for tree and directory. --- bash/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash/functions b/bash/functions index 75948b0..992a3d0 100644 --- a/bash/functions +++ b/bash/functions @@ -23,7 +23,8 @@ function parse_git_status { if [[ $(git status 2> /dev/null | wc -l) -eq 0 ]]; then return fi - if [[ $(git status 2> /dev/null | grep "working directory clean" | wc -l) -eq 0 ]]; then + + if [[ $(git status 2> /dev/null | grep -E "working tree|directory clean" | wc -l) -eq 0 ]]; then echo ' ∓' fi }