From 54b0221c4c41a3977e8e7a36ab85fe7c6f736a3b Mon Sep 17 00:00:00 2001 From: Andreas Rudat Date: Fri, 21 Jul 2017 20:55:12 +0200 Subject: [PATCH] add single user rvm bin directory to PATH --- functions/rvm.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/rvm.fish b/functions/rvm.fish index a924c0e..30846b0 100644 --- a/functions/rvm.fish +++ b/functions/rvm.fish @@ -2,7 +2,7 @@ function rvm --description='Ruby enVironment Manager' # run RVM and capture the resulting environment set --local env_file (mktemp -t rvm.fish.XXXXXXXXXX) # This finds where RVM's root directory is and sources scripts/rvm from within it. Then loads RVM in a clean environment and dumps the environment variables it generates out for us to use. - bash -c 'PATH=$GEM_HOME/bin:$PATH;RVMA=$(which rvm);RVMB=$(whereis rvm | sed "s/rvm://");source $(if test $RVMA;then echo $RVMA | sed "s/\/bin\//\/scripts\//";elif test $RVMB; then echo $RVMB | sed "s/rvm/rvm\/scripts\/rvm/"; else echo ~/.rvm/scripts/rvm; fi); rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv + bash -c 'PATH=$rvm_bin_path:GEM_HOME/bin:$PATH;RVMA=$(which rvm);RVMB=$(whereis rvm | sed "s/rvm://");source $(if test $RVMA;then echo $RVMA | sed "s/\/bin\//\/scripts\//";elif test $RVMB; then echo $RVMB | sed "s/rvm/rvm\/scripts\/rvm/"; else echo ~/.rvm/scripts/rvm; fi); rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv # apply rvm_* and *PATH variables from the captured environment and eval (grep -E '^rvm|^GEM_PATH|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//')