derekstavis / plugin-nvm

Node version manager wrapper for Fish shell
MIT License
233 stars 12 forks source link

Add --no-use to nvm.sh sourceing #12

Closed lunij closed 5 years ago

lunij commented 7 years ago

Option --no-use of nvm.sh prevents it from loading the default node version. This ensures the already loaded version (ie. from .nvmrc file) remains active.

nvm install v6
nvm install v8
nvm alias default v8
nvm use v6
node --version # v6...
nvm version # see below

Expected: v6... Actual: v8...

theRealPadster commented 5 years ago

I've been struggling to get nvm working with Fish shell on MacOS, and found this plugin, which works, but it reverts the node version to the latest (10.3.0) when I run nvm version.

If I nvm use v6.11.1, a which node call shows it's using the right version, but it switches back to 10.3.0 after running nvm version. I spent a while troubleshooting and googling it, and adding this flag fixes it.

I was going to try and add a pull request myself, then I found there already was one. I'm not sure how the CI tests work, I don't have any experience with that, but is there anything I can do to get this merged? It's genuinely helpful and I'm sad to see that it was submitted a year ago and nothing happened with it.

lunij commented 5 years ago

It seems this repo is not maintained anymore for some reason which is a surprise because nvm and fish shell is pretty popular I'd say.

theRealPadster commented 5 years ago

@lunij Would you be interested in submitting your patched version to the omf repo? I'm not sure how everything would work in terms of code ownership etc, but it would make it easier to get things set up after a new install. I was going to do it myself, but I remembered you've got a fork/PR already, so I'd suggest it first.

derekstavis commented 5 years ago

So sorry for not taking a look into this previously. It's merged now.