summaryrefslogtreecommitdiff
path: root/themes/macovsky-ruby.zsh-theme
diff options
context:
space:
mode:
authorJames Smith <james@loopj.com>2012-07-24 13:39:07 -0700
committerJames Smith <james@loopj.com>2012-07-24 13:39:07 -0700
commit772bc51c3a2372592c400e0d4e159a0128989ba2 (patch)
tree191af002e272ce95418910b9c0ea63443e48e681 /themes/macovsky-ruby.zsh-theme
parent0ba398f9e1aaf05e72406d5c840f013eebb6b260 (diff)
parentd05b2010ffd4cd33ff9402c402051b1caf985d97 (diff)
downloadzsh-772bc51c3a2372592c400e0d4e159a0128989ba2.tar.gz
zsh-772bc51c3a2372592c400e0d4e159a0128989ba2.tar.bz2
zsh-772bc51c3a2372592c400e0d4e159a0128989ba2.zip
Merge
Diffstat (limited to 'themes/macovsky-ruby.zsh-theme')
-rw-r--r--themes/macovsky-ruby.zsh-theme9
1 files changed, 8 insertions, 1 deletions
diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme
index 4eb410233..045376761 100644
--- a/themes/macovsky-ruby.zsh-theme
+++ b/themes/macovsky-ruby.zsh-theme
@@ -1,7 +1,14 @@
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
-PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
+if which rvm-prompt &> /dev/null; then
+ PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
+else
+ if which rbenv &> /dev/null; then
+ PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
+ fi
+fi
+
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"