Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set PATH after symlinks for zsh to rehash.

  • Loading branch information...
commit dcabdc69fca8375c793f96c81609029c7ba64ae6 1 parent e0b0e6b
@wayneeseguin authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 scripts/selector
View
18 scripts/selector
@@ -166,8 +166,8 @@ __rvm_use() {
if [[ "default" = "$rvm_ruby_interpreter" ]] ; then
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
- export PATH=$rvm_bin_path:$PATH
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
+ new_path=$rvm_bin_path:$new_path
if [[ -s $rvm_path/default ]] ; then
source $rvm_path/default
@@ -185,8 +185,8 @@ __rvm_use() {
elif [[ "system" = "$rvm_ruby_interpreter" ]] ; then
unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
- PATH=$rvm_bin_path:$PATH ; export PATH
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
+ new_path=$rvm_bin_path:$new_path
if [[ -s $rvm_path/system ]] ; then
grep "^MY_RUBY_HOME='$rvm_path" "$rvm_path/system" > /dev/null
if [[ $? -eq 0 ]] ; then
@@ -235,9 +235,8 @@ __rvm_use() {
__rvm_irbrc
- PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
- PATH=$rvm_bin_path:$PATH ; export PATH
- PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:$PATH ; export PATH
+ new_path=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
+ new_path=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:$rvm_bin_path:$new_path
if [[ "root" = "$(whoami)" ]] ; then
for binary in erb gem irb rake rdoc ri ruby testrb ; do
@@ -285,8 +284,9 @@ __rvm_use() {
if [[ ! -z "$rvm_ruby_string" ]] ; then export rvm_ruby_string ; fi
if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
- if [[ ! -z "$rvm_load_flag" ]] ; then __rvm_gems_load ; fi
- if [[ ! -z "$rvm_dump_flag" ]] ; then __rvm_gems_dump ; fi
+ if [[ ! -z "$new_path" ]] ; then
+ export PATH="$new_path" ; unset new_path
+ fi
__rvm_hook "after_use"
}
Please sign in to comment.
Something went wrong with that request. Please try again.