mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
managed multi-user install location for rvm.fish
This commit is contained in:
parent
f2be6ff368
commit
d118eba311
@ -1,7 +1,7 @@
|
|||||||
function rvm -d 'Ruby enVironment Manager'
|
function rvm -d 'Ruby enVironment Manager'
|
||||||
# run RVM and capture the resulting environment
|
# run RVM and capture the resulting environment
|
||||||
set -l env_file (mktemp -t rvm.fish.XXXXXXXXXX)
|
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
|
# 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/)//')
|
and eval (grep '^rvm\|^[^=]*PATH\|^RUBY_\|^GEM_' $env_file |grep -v _clr| sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//')
|
||||||
|
Loading…
Reference in New Issue
Block a user