aboutsummaryrefslogtreecommitdiffstats
path: root/.bash_prompt
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2012-11-23 08:36:17 +0100
committerMathias Bynens <mathias@qiwi.be>2012-11-23 08:37:29 +0100
commit9e4f9a84258649aa061f145903ae1681af64814d (patch)
tree4922853041f7b2ce97dd0a58d7906fc95c588a10 /.bash_prompt
parentb96cd30e3552a0f77b93c954c096b472cc1b4940 (diff)
downloaddotfiles-9e4f9a84258649aa061f145903ae1681af64814d.tar.gz
dotfiles-9e4f9a84258649aa061f145903ae1681af64814d.tar.bz2
dotfiles-9e4f9a84258649aa061f145903ae1681af64814d.zip
.bash_prompt: Fix `parse_git_dirty` for Git v1.8.0+
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.
Diffstat (limited to '.bash_prompt')
-rw-r--r--.bash_prompt2
1 files changed, 1 insertions, 1 deletions
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() {