summaryrefslogtreecommitdiff
path: root/themes/macovsky-ruby.zsh-theme
diff options
context:
space:
mode:
authorMax Masnick <max@masnick.me>2012-02-25 16:15:40 -0500
committerMax Masnick <max@masnick.me>2012-02-25 16:15:40 -0500
commit7441438afa9f96ff1d39a6cd0d8692c2b9044bf2 (patch)
tree508d195705e63c5baff4ed9ead765744feec323f /themes/macovsky-ruby.zsh-theme
parent9e3776f1ecbaa29d646cdfe8fc204597ca98746c (diff)
parent1120f973054836eeb53750f57d69fbec41a340dc (diff)
downloadzsh-7441438afa9f96ff1d39a6cd0d8692c2b9044bf2.tar.gz
zsh-7441438afa9f96ff1d39a6cd0d8692c2b9044bf2.tar.bz2
zsh-7441438afa9f96ff1d39a6cd0d8692c2b9044bf2.zip
merge changes from offical repo
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]%}‹"