This commit is contained in:
tavo 2025-10-18 22:54:00 -06:00
parent 6fcf1f92db
commit 486145fb70
2 changed files with 27 additions and 7 deletions

1
.gitignore vendored
View file

@ -283,3 +283,4 @@ sunshine/
clipse/ clipse/
X11/xinit/xinitrc.d/* X11/xinit/xinitrc.d/*
github-copilot github-copilot
configstore/

View file

@ -2,11 +2,30 @@
export NVM_DIR="$HOME/.config/nvm" export NVM_DIR="$HOME/.config/nvm"
if [ -s "$NVM_DIR/nvm.sh" ]; then _nvm_lazy_load() {
# nvm.sh is a very large file that causes shell startup to slow unset -f nvm npm npx node
# down, this wrapper sources nvm.sh only after calling nvm.
nvm() { if [ -s "$NVM_DIR/nvm.sh" ]; then
. "$NVM_DIR/nvm.sh" . "$NVM_DIR/nvm.sh"
nvm "$@" fi
} }
fi
nvm() {
_nvm_lazy_load
nvm $@
}
npm() {
_nvm_lazy_load
npm $@
}
npx() {
_nvm_lazy_load
npx $@
}
node() {
_nvm_lazy_load
node $@
}