summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Lindberg <eproxus@gmail.com>2011-06-01 10:11:06 +0200
committerAdam Lindberg <eproxus@gmail.com>2011-06-01 10:11:06 +0200
commita9b6f081b4a405dd1365df9c35aa3603196e3fc7 (patch)
tree7ff7932b19a25ca4bbd76d18174afa06ce158a70
parent9c306670a73ec3e313666fc497952153bdc16220 (diff)
downloadzsh-a9b6f081b4a405dd1365df9c35aa3603196e3fc7.tar.gz
zsh-a9b6f081b4a405dd1365df9c35aa3603196e3fc7.tar.bz2
zsh-a9b6f081b4a405dd1365df9c35aa3603196e3fc7.zip
Remove extra space when no status
-rw-r--r--themes/guru.zsh-theme5
1 files changed, 1 insertions, 4 deletions
diff --git a/themes/guru.zsh-theme b/themes/guru.zsh-theme
index c63f1082a..aa7b28b34 100644
--- a/themes/guru.zsh-theme
+++ b/themes/guru.zsh-theme
@@ -27,9 +27,6 @@ fi
local return_code="%(?..%{$R%}%? ↵%{$RESET%})"
-GIT_PREFIX="%{$YB%}‹"
-GIT_SUFFIX="%{$YB%}›"
-
# Get the status of the working tree (copied and modified from git.zsh)
custom_git_prompt_status() {
INDEX=$(git status --porcelain 2> /dev/null)
@@ -65,7 +62,7 @@ custom_git_prompt_status() {
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_ADDED$STATUS"
fi
- if $(echo "$STATUS" &> /dev/null); then
+ if $(echo -n "$STATUS" | grep '.*' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_STATUS_PREFIX$STATUS"
fi