Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

.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.
  • Loading branch information...
commit 9e4f9a84258649aa061f145903ae1681af64814d 1 parent b96cd30
Mathias Bynens authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  .bash_prompt
2  .bash_prompt
View
@@ -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() {

1 comment on commit 9e4f9a8

Nicolas Hery

Cheers :)

Please sign in to comment.
Something went wrong with that request. Please try again.