randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.37k stars 83 forks source link

nvm doesn't work properly under Terminus #346

Open lapinvert opened 2 years ago

lapinvert commented 2 years ago

As a mac user and having installed everything the regular way, my default shell is zshell and I have those lines in my .zprofile:

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

which is the default installation.

Steps to reproduce issue:

  1. At first, I do nvm current, it outputs version 17.
  2. Then, I do nvm alias default 16 to change default version to 16
  3. Check if it worked on Apple Terminal: enter nvm current-> it outputs 16 as expected. echo $PATH shows version 16 is added.
  4. However, with Terminus, when I type nvm current on a new shell -> it outputs 17. Not expected. echo $PATH shows version 17 is still the one. nvm list shows current version is 17 and default version is 16. Despite that, opening a new shell fails to load version 16 as current.

My nvm version is 0.39.0.

Any ideas how to solve it?