2e74fe735e07764a36c865db31bc6b82592139e8

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #2619 from korylprince/master

Don't show useless '[]' when chruby_prompt_info is empty

Diff

 1diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme
 2index 1ff86b54c41d1e188fe89ee5dceeb241701e0be9..f1057a9a974fafd033ea30a613d76295aefaaaa5 100644
 3--- a/themes/gallois.zsh-theme
 4+++ b/themes/gallois.zsh-theme
 5@@ -18,7 +18,7 @@ else
 6   if which rbenv &> /dev/null; then
 7     RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1'
 8   else
 9-    if which chruby_prompt_info &> /dev/null; then
10+    if [[ -n `which chruby_prompt_info` && -n `chruby_prompt_info` ]]; then
11       RPS1='$(git_custom_status)%{$fg[red]%}[`chruby_prompt_info`]%{$reset_color%} $EPS1'
12     else
13       RPS1='$(git_custom_status) $EPS1'