Browse code

Merge branch 'master' of github.com:Gonzih/oh-my-zsh

Max Gonzih authored on 02/09/2011 at 13:07:12
Showing 2 changed files
... ...
@@ -7,6 +7,7 @@ function vundle-init () {
7 7
   if [ ! -d ~/.vim/bundle/vundle/.git/ ]
8 8
   then
9 9
     git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
10
+    echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n"
10 11
   fi
11 12
 }
12 13
 
... ...
@@ -35,9 +35,17 @@ local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
35 35
 
36 36
 local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}'
37 37
 local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}'
38
-local rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
38
+local rvm_ruby=''
39
+if which rvm-prompt &> /dev/null; then
40
+  rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
41
+else
42
+  if which rbenv &> /dev/null; then
43
+    rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}'
44
+  fi
45
+fi
39 46
 local git_branch='$(git_prompt_info)%{$PR_NO_COLOR%}'
40 47
 
48
+#PROMPT="${user_host} ${current_dir} ${rvm_ruby} ${git_branch}$PR_PROMPT "
41 49
 PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
42 50
 ╰─$PR_PROMPT "
43 51
 RPS1="${return_code}"