jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.08k stars 69 forks source link

NVM_DIR convention not followed #146

Closed lordlycastle closed 3 years ago

lordlycastle commented 3 years ago

The "other" nvm-sh tool uses $HOME/.nvm as their install dir. They get that from $NVM_DIR var. This tool does not follow that convention.

This is many bad side effect, mainly other tools expect nvm to follow that convention e.g. IntelliJ. Now you have to change NVM_DIR on shell startup config file AND tell IntelliJ about this custom path because IntelliJ is not aware of dynamic change from config.fish.

Can we make this tool also use $NVM_DIR so it's a drop in replacement for the nvm-sh?

Sadly in Unix world the new generation tool must be backwards compatible. Which limits evolution of tool but it is neccessary evil because without plug-&-play integration it's a pain to use/setup.

jorgebucaran commented 3 years ago

This tool is really not a drop-in replacement for that nvm. But maybe we could favor $NVM_DIR if set, then default to $XDG_DATA_HOME as we currently do.

If you open a PR with the changes you need I'll have a look. I'm not planning to work on this myself, so closing.