@
Immortal #30 这个问题是可以解决的
# nvm 默认的配置会使得每次打开 iterm 都很慢,需要改成按需加载
export NVM_DIR="$HOME/.nvm"
# 本来每次启动 terminal 的时候都需要执行下面两行代码的
#[ -s "$NVM_DIR/
nvm.sh" ] && \. "$NVM_DIR/
nvm.sh" # This loads nvm
#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
function _install_nvm() {
unset -f nvm
[ -s "$NVM_DIR/
nvm.sh" ] && \. "$NVM_DIR/
nvm.sh" # This sets up nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # load nvm bash_completion
nvm "$@"
}
function nvm() {
_install_nvm "$@"
}