fish_prompt: fix __bobthefish_rvm_info for both rvm installation types (#140)

pull/144/merge
Alberto Cavalin 6 years ago committed by Justin Hileman
parent 0cc32a5585
commit c6d8357a91

@ -583,8 +583,12 @@ function __bobthefish_rvm_parse_ruby -S -a ruby_string scope -d 'Parse RVM Ruby
end
function __bobthefish_rvm_info -S -d 'Current Ruby information from RVM'
# look for rvm install path
set -q rvm_path
or set -l rvm_path ~/.rvm /usr/local/rvm
# More `sed`/`grep`/`cut` magic...
set -l __rvm_default_ruby (grep GEM_HOME ~/.rvm/environments/default | sed -e"s/'//g" | sed -e's/.*\///')
set -l __rvm_default_ruby (grep GEM_HOME $rvm_path/environments/default | sed -e"s/'//g" | sed -e's/.*\///')
set -l __rvm_current_ruby (rvm-prompt i v g)
[ "$__rvm_default_ruby" = "$__rvm_current_ruby" ]; and return

Loading…
Cancel
Save