zsh-nvm use not fully working
abz123 opened this issue · comments
Able to change node versions in an open terminal.
Then opening a new tab or closing/opening terminal or switching panes in tmux reverts to initial node version?
↳ nvm ls
-> v10.15.2
v10.15.3
↳ nvm use 10.15.3
Now using node v10.15.3 (npm v6.4.1)
↳ nvm ls
v10.15.2
-> v10.15.3
Opened a new tab in terminal Or closed and opened terminal Or in tmux switched panes in same window and session:
↳ nvm ls
-> v10.15.2
v10.15.3
Ubuntu 18.04, zsh, omz, tmux
That's expected nvm
behaviour:
nvm use [--silent] <version> Modify PATH to use <version>. Uses .nvmrc if available
It just modifies the PATH of the current session.
If you want to set a default Node.js version you need to alias it:
nvm alias default 8.1.0 Set default node version on a shell
Did not read about alias which works as you showed, thankyou.