Open ghost opened 5 years ago
By the way: thanks for the plugin! I really did not want to write one myself, and with some slight modifications (see #15) it works like a charm! 👍
Hmm seems that I was too quick ... nvm
does not modify my $PATH
variable and can't find node
while it works in plain bash. Maybe it is too good to be true after all ...
This was a rather difficult one to track down: some distributions have a special clause in their
~/.bashrc
that looks something like this (taken from this gist):This answer on ServerFault explains in detail why that is, and from the looks of it, for the sake of backwards-compatibility, it isn't going to go away very soon. In my case, it means that the command
nvm
could not be found, even though my.bashrc
was set up correctly.I propose a small change to the documentation to notify people who are having trouble with this. You can do the following and get it working completely:
Next, wrap the command you would like to run in a function, like so:
Until fish functions are able to accept environment variables, I'm afraid that's the best I can come up with.