You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Those two lines cause a noticable delay every time you open the terminal.
Since a user probably isn't using NVM all the time (Only to install node once for most of us), what if instead those two lines were added in a shell function like this? :
function loadnvm
{
[ -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
}
With this, whenever I want to use nvm, I simply type "loadnvm" and then I could use the commands I need in that shell session.
The text was updated successfully, but these errors were encountered:
You can add --no-use - ie, change [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" to [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use, and then it won't auto-use, which is the only slow part.
Currently, NVM adds the following to your bashrc / zshrc:
Those two lines cause a noticable delay every time you open the terminal.
Since a user probably isn't using NVM all the time (Only to install node once for most of us), what if instead those two lines were added in a shell function like this? :
With this, whenever I want to use nvm, I simply type "loadnvm" and then I could use the commands I need in that shell session.
The text was updated successfully, but these errors were encountered: