a9b6f081b4a405dd1365df9c35aa3603196e3fc7

Author
Adam Lindberg <eproxus@gmail.com>
Committer
Adam Lindberg <eproxus@gmail.com>
Date

Message

Remove extra space when no status

Diff

 1diff --git a/themes/guru.zsh-theme b/themes/guru.zsh-theme
 2index c63f1082af5aa85687d4c390b31c092c9d61d65c..aa7b28b34e3a2249a7763be7b185ddf28fd78348 100644
 3--- a/themes/guru.zsh-theme
 4+++ b/themes/guru.zsh-theme
 5@@ -27,9 +27,6 @@ fi
 6 
 7 local return_code="%(?..%{$R%}%? ↵%{$RESET%})"
 8 
 9-GIT_PREFIX="%{$YB%}‹"
10-GIT_SUFFIX="%{$YB%}›"
11-
12 # Get the status of the working tree (copied and modified from git.zsh)
13 custom_git_prompt_status() {
14   INDEX=$(git status --porcelain 2> /dev/null)
15@@ -65,7 +62,7 @@ custom_git_prompt_status() {
16     STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_ADDED$STATUS"
17   fi
18 
19-  if $(echo "$STATUS" &> /dev/null); then
20+  if $(echo -n "$STATUS" | grep '.*' &> /dev/null); then
21     STATUS="$ZSH_THEME_GIT_STATUS_PREFIX$STATUS"
22   fi
23