Remove extra space when no status

This commit is contained in:
Adam Lindberg 2011-06-01 10:11:06 +02:00
parent 9c306670a7
commit a9b6f081b4

View File

@ -27,9 +27,6 @@ fi
local return_code="%(?..%{$R%}%? ↵%{$RESET%})" local return_code="%(?..%{$R%}%? ↵%{$RESET%})"
GIT_PREFIX="%{$YB%}"
GIT_SUFFIX="%{$YB%}"
# Get the status of the working tree (copied and modified from git.zsh) # Get the status of the working tree (copied and modified from git.zsh)
custom_git_prompt_status() { custom_git_prompt_status() {
INDEX=$(git status --porcelain 2> /dev/null) INDEX=$(git status --porcelain 2> /dev/null)
@ -65,7 +62,7 @@ custom_git_prompt_status() {
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_ADDED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_ADDED$STATUS"
fi fi
if $(echo "$STATUS" &> /dev/null); then if $(echo -n "$STATUS" | grep '.*' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_STATUS_PREFIX$STATUS" STATUS="$ZSH_THEME_GIT_STATUS_PREFIX$STATUS"
fi fi