2 ms·
Agree, also had the same issue but it's easy to fix (and also cleans up your environment a bit) by doing the following alias: function n() { export N
by capableweb 6y ago
Agree, also had the same issue but it's easy to fix (and also cleans up your environment a bit) by doing the following alias:
function n() {
export NVM_DIR="$HOME/.nvm"
[ -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
}
Now your shells startup time is not affected, and when you want to use node, you simply execute the `n` command first, and then you use nvm normally.
- the_mitsuhiko 6y agoI had all kinds of workarounds for that, even a custom zsh thing that tried to automate it as much as possible. Thankfully I no longer have to deal with this :)