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.
Buddy Sandidge 8 years ago
parent 9ebb538e24
commit ce7ad3ffeb

@ -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
}

Loading…
Cancel
Save