Browse code

makes git status prompt 4x faster

(via git status -s, benchmarked)

Andy Fowler authored on 04/05/2010 at 20:18:57
Showing 1 changed files
... ...
@@ -5,7 +5,7 @@ function git_prompt_info() {
5 5
 }
6 6
 
7 7
 parse_git_dirty () {
8
-  if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then
8
+  if [[ -n $(git status -s 2> /dev/null) ]]; then
9 9
     echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
10 10
   else
11 11
     echo "$ZSH_THEME_GIT_PROMPT_CLEAN"