mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-01 14:47:31 +00:00
25 lines
501 B
Fish
25 lines
501 B
Fish
function nvm
|
|
if not type -q bass
|
|
echo 'Bass is not installed please install it running fisher edc/bass'
|
|
return
|
|
end
|
|
set -q NVM_DIR; or set -gx NVM_DIR ~/.nvm
|
|
set -q nvm_prefix; or set -gx nvm_prefix $NVM_DIR
|
|
|
|
bass source $nvm_prefix/nvm.sh --no-use ';' nvm $argv
|
|
|
|
set bstatus $status
|
|
|
|
if test $bstatus -gt 0
|
|
return $bstatus
|
|
end
|
|
|
|
if test (count $argv) -lt 1
|
|
return 0
|
|
end
|
|
|
|
if test $argv[1] = "use"; or test $argv[1] = "install"
|
|
set -gx NVM_HAS_RUN 1
|
|
end
|
|
end
|