dot_files/dot_oh-my-zsh/custom/tools/nvm.zsh
Viktor Barzin 8db9aa926d Speed up shell startup: remove duplicate compinit, lazy-load pyenv/nvm
- Remove manual compinit in .zshrc (oh-my-zsh already handles it),
  eliminating a redundant ~350ms call
- Lazy-load pyenv init (~710ms) until first use, matching the existing
  kubectl lazy-load pattern
- Lazy-load nvm init for when it gets installed in the future
2026-02-15 18:31:04 +00:00

14 lines
381 B
Bash

# NVM (Node Version Manager) configuration
# Auto-loaded by oh-my-zsh from $ZSH_CUSTOM/tools/
# Lazy-loaded: defers nvm init until first use
export NVM_DIR="$HOME/.nvm"
if [[ -s "$NVM_DIR/nvm.sh" ]]; then
function nvm() {
unfunction nvm
\. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm "$@"
}
fi