From d118eba31146824bb13d60baf147a36a21f83878 Mon Sep 17 00:00:00 2001 From: costa Date: Sat, 25 May 2013 12:11:13 +0200 Subject: [PATCH] managed multi-user install location for rvm.fish --- plugins/rvm/rvm.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rvm/rvm.fish b/plugins/rvm/rvm.fish index 60cc46c..01295ae 100644 --- a/plugins/rvm/rvm.fish +++ b/plugins/rvm/rvm.fish @@ -1,7 +1,7 @@ function rvm -d 'Ruby enVironment Manager' # run RVM and capture the resulting environment set -l env_file (mktemp -t rvm.fish.XXXXXXXXXX) - bash -c 'source ~/.rvm/scripts/rvm; cd .;rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv + bash -c '[ -e ~/.rvm/scripts/rvm ] && source ~/.rvm/scripts/rvm || source /usr/local/rvm/scripts/rvm; cd .;rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv # apply rvm_* *PATH RUBY_* GEM_* variables from the captured environment and eval (grep '^rvm\|^[^=]*PATH\|^RUBY_\|^GEM_' $env_file |grep -v _clr| sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//')