Closed mr-pinzhang closed 8 years ago
And I figured out one solution, is that add bass source $NVM_DIR/nvm.sh
to config.fish
That's the point, sourcing nvm everytime you open a new terminal will slow it down by a couple of seconds, this plugins only sources nvm when you run nvm
, npm
or node
if you want it to be runnig whenever you open the terminal just add this to your config.fish
if not type -q bass
echo 'Bass is not installed please install it running fisher edc/bass'
else
bass source $NVM_DIR/nvm.sh >/dev/null ^&1
end
yep.. I noticed that before.. actually, it's much slower
is that caused by bass
process?
anyway, thanks the code!
The biggest problem is in nvm itself, more info in https://github.com/creationix/nvm/issues/860 and https://github.com/creationix/nvm/issues/703
Of course sourcing bash code in fish adds a couple of milliseconds
@bjmin If you are not constrained to using nvm (e.g, company rule, etc), I recommend you https://github.com/fisherman/fin.
@bucaran thx~.. though i'm looking for a more native way to install Node, i'll give a try!
@bjmin I could be completely wrong, and please @FabioAntunes correct me if I am wrong, but I see little benefit to building from source unless you actually want to fiddle with the source code, in which case, sure go ahead :)
I believe that loading nvm.sh after intialization would be better, otherwise It won't inject or modify necessary ENV VARIABLES into global, like
$PATH
, where stores some global dependencies installed by NPM. Only I can access the bin after typenode
ornvm
, it's annoying, right?