mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-27 12:58:28 +00:00
chore: fish: migrate back to nvm
This commit is contained in:
24
config/fish/functions/nvm.fish
Normal file
24
config/fish/functions/nvm.fish
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
||||
Reference in New Issue
Block a user