mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-23 07:56:27 +00:00
feat(config): use nvm with bass, simplify setup
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user