mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
Updating rvm scripts from rubycut/fish-inwater.
This commit is contained in:
parent
9ad425c718
commit
f026e18384
@ -16,8 +16,8 @@ function cd --description "Change directory"
|
|||||||
end
|
end
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
if test -s ".rvmrc"
|
if begin ; test -s ".rvmrc" ; or test -s ".versions.conf" ; end
|
||||||
eval "rvm reload" > /dev/null
|
rvm reload 1>/dev/null 2>&1
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
set cwd (dirname "$cwd")
|
set cwd (dirname "$cwd")
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
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; rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv
|
bash -c 'source ~/.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/)//')
|
||||||
|
|
||||||
# apply rvm_* and *PATH variables from the captured environment
|
|
||||||
and eval (grep '^rvm\|^[^=]*PATH' $env_file | sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//')
|
|
||||||
# clean up
|
# clean up
|
||||||
rm -f $env_file
|
rm -f $env_file
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user