nvm
nvm copied to clipboard
Add info on how to enable version auto switching using .bashrc file
Add info on how to enable version auto switching using .bashrc
file when entering directory that contains .node-version
file and fallback to default version on entering directory that doesn't contain .node-version
file
No problem, .nvmrc
will work as well. Changed file names in ac7e0a8
That's a good point. Didn't know about --silent
option. Added it in 9773734
Hm..strange thing but it doesn't work for me. I run nvm use --silent
in terminal but it says: No .nvmrc file found
followed by whole help output when directory does not conatin .nvmrc
. I tried tag 0.31.0
and master
branch with latest commit 96afff7 on Ubuntu 14.04. Are sure it should work this way?
@mik356ua oops, you're right. the behavior i'm thinking of is when nvm.sh
is sourced. nvm_auto use
is the internal (but not documented) mechanism used here. It's probably fine to rely on that - I could also expose it as an nvm
command.
Is there a reason why nvm can't also support .node-version
if present as a fallback to .nvmrc
?
That may make it easier to collaborate with Windows folks using nodist.
@ldeck nvm supports nvm-specific syntax in nvmrc. node-version
is not a standard, and if it were to be, all of the node version management tools (as well as ideally node itself) would have to agree on what syntax it supports. It would be exceedingly bad for something to become commonly used before all of the issues had been properly worked out with all of the interested parties, and I won't allow nvm
to bless .node-version
until that happens.
@ljharb cool. Thanks.
Please merge this one in. I searched a while before i got this. Great work, thx man