jorgebucaran / nvm.fish

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

Did nvm.fish compatible with bash version? #217

Closed doaortu closed 9 months ago

doaortu commented 9 months ago

I have node v18 installed on bash, but in fish it doesn't got recognized.

I also noticed that nvm.fish installed node versions in different folder ( .local/share/nvm/{version} ) than in bash ( .nvm/versions/node/{version} )

is it also intended behavior? I guess I can't use this if I want to use nvm in fish and still maintain compatibility with bash?

Thank you in advance.

jorgebucaran commented 9 months ago

nvm.fish is a Node version manager specifically created for Fish. When you install Node using nvm.fish, it alters the PATH. This means that once a Node version is installed, it should be accessible in any shell spawned from the current session, including bash, zsh, etc., but you are right in noting that nvm.fish is not built for compatibility with Bash.

ljharb commented 9 months ago

I think the question was, is nvm.fish meant to share node installations with actual nvm?

jorgebucaran commented 9 months ago

Ah, I see. In that case, not exactly. nvm.fish adheres to the XDG directory convention by default, which Fish also uses. Commands in nvm.fish are quite similar to those in nvm, so there's a bit of compatibility in that regard, but that's pretty much the extent of it.

ljharb commented 9 months ago

nvm also adheres to XDG by default - it's just that the majority of XDG is "should"s and not "must"s, so there's very little that's actually mandated.

doaortu commented 9 months ago

I see, thanks for the explanation.

and thanks @ljharb for clarifying my question.