summaryrefslogtreecommitdiff
path: root/themes/dallas.zsh-theme
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2012-01-25 18:14:29 -0800
committerRobby Russell <robby@planetargon.com>2012-01-25 18:14:29 -0800
commitb56e37201dd6cf00a667daa1f033cfb1b1669b4a (patch)
tree0be7579715d81186b2ba2c8361ff620eb544d878 /themes/dallas.zsh-theme
parent9dc9cae55f5aa9ab12db71da64ab062906d8504b (diff)
parent6496acf58bf8531809490b52e34811f74a27cc7c (diff)
downloadzsh-b56e37201dd6cf00a667daa1f033cfb1b1669b4a.tar.gz
zsh-b56e37201dd6cf00a667daa1f033cfb1b1669b4a.tar.bz2
zsh-b56e37201dd6cf00a667daa1f033cfb1b1669b4a.zip
Merge pull request #860 from sbfaulkner/rbenv-support-for-themes
adding rbenv support to all the rvm themes
Diffstat (limited to 'themes/dallas.zsh-theme')
-rw-r--r--themes/dallas.zsh-theme8
1 files changed, 7 insertions, 1 deletions
diff --git a/themes/dallas.zsh-theme b/themes/dallas.zsh-theme
index eef32e998..e9b4f852a 100644
--- a/themes/dallas.zsh-theme
+++ b/themes/dallas.zsh-theme
@@ -3,7 +3,13 @@
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
-DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
+if which rvm-prompt &> /dev/null; then
+ DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
+else
+ if which rbenv &> /dev/null; then
+ DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}"
+ fi
+fi
# Grab the current machine name: muscato
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
# Grab the current filepath, use shortcuts: ~/Desktop