summaryrefslogtreecommitdiff
path: root/themes/macovsky-ruby.zsh-theme
diff options
context:
space:
mode:
authorBrent Faulkner <brent.faulkner@mosaic.com>2012-01-23 20:42:54 -0500
committerBrent Faulkner <brent.faulkner@mosaic.com>2012-01-23 20:42:54 -0500
commit6496acf58bf8531809490b52e34811f74a27cc7c (patch)
tree56607cbfdd2e9fc12dbbcf55b2a8b132f807e5ab /themes/macovsky-ruby.zsh-theme
parentac910b85bd782ec7a033b67bab7be63785d063c2 (diff)
downloadzsh-6496acf58bf8531809490b52e34811f74a27cc7c.tar.gz
zsh-6496acf58bf8531809490b52e34811f74a27cc7c.tar.bz2
zsh-6496acf58bf8531809490b52e34811f74a27cc7c.zip
adding rbenv support to all the rvm themes
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]%}‹"