You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
595 B
Fish
25 lines
595 B
Fish
12 years ago
|
function __check_rvm --on-variable PWD --description 'Setup rvm on directory change'
|
||
|
status --is-command-substitution; and return
|
||
|
|
||
|
if test "$rvm_project_rvmrc" != 0
|
||
|
set -l cwd $PWD
|
||
|
while true
|
||
|
if contains $cwd "" $HOME "/"
|
||
|
if test "$rvm_project_rvmrc_default" = 1
|
||
|
rvm default 1>/dev/null 2>&1
|
||
|
end
|
||
|
break
|
||
|
else
|
||
|
if begin ; test -s ".rvmrc" ; or test -s ".versions.conf" ; end
|
||
|
rvm reload 1>/dev/null 2>&1
|
||
|
break
|
||
|
else
|
||
|
set cwd (dirname "$cwd")
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
set -e cwd
|
||
|
end
|
||
|
end
|