From 182ff9de937560bc044ab5ff7ef4cafbdb2787c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis?= Date: Thu, 23 Jan 2025 20:56:06 +0200 Subject: [PATCH] Use login bash shell Use login bash shell --- functions/rvm.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/rvm.fish b/functions/rvm.fish index 8959400..ed20296 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 -l -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 # apply rvm_* and *PATH variables from the captured environment and eval (grep -E '^rvm|^PATH|^GEM_PATH|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//')