feat(config): use nvm with bass, simplify setup

Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
2025-04-04 16:33:32 +03:00
parent 5d476e8eed
commit 6ffe581326
13 changed files with 22 additions and 246 deletions

View File

@@ -1,24 +1,4 @@
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
bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv
end