Browse code

Remove extra space when no status

Adam Lindberg authored on 01/06/2011 at 08:11:06
Showing 1 changed files
... ...
@@ -27,9 +27,6 @@ fi
27 27
 
28 28
 local return_code="%(?..%{$R%}%? ↵%{$RESET%})"
29 29
 
30
-GIT_PREFIX="%{$YB%}‹"
31
-GIT_SUFFIX="%{$YB%}›"
32
-
33 30
 # Get the status of the working tree (copied and modified from git.zsh)
34 31
 custom_git_prompt_status() {
35 32
   INDEX=$(git status --porcelain 2> /dev/null)
... ...
@@ -65,7 +62,7 @@ custom_git_prompt_status() {
65 65
     STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_ADDED$STATUS"
66 66
   fi
67 67
 
68
-  if $(echo "$STATUS" &> /dev/null); then
68
+  if $(echo -n "$STATUS" | grep '.*' &> /dev/null); then
69 69
     STATUS="$ZSH_THEME_GIT_STATUS_PREFIX$STATUS"
70 70
   fi
71 71