NVM wrapper for the fish shell - NOT MAINTAINED
Clone or download
passcod Thank you all
Thanks to @edc for creating bass.

Thanks to @lnikkila and @brandonweiss for code contributions.

Thanks to @keithamus, @externl, @blazeworx, @taktran, @jkarttunen, @jakubholynet, @doughsay, @alex7kom, @msx, @steve-ross, @leebrooks0, @nanoxd, @tomekiwi, @randyschneck, @jadengore, as well as the contributors above for reporting bugs and helping out in the issue threads.

Thanks also to all stargazers not mentioned above: @Globegitter, @luhmann, @oahziur, @mike-engel, @yamafaktory, @footearth, @pborenstein, @ceejbot (famous npm people starring my work! *o*), @plord, @sobering, @matthewspencer, @rossluebe, @d6u, @arnaudsj, @jney, @arbourd, @jeromecovington, @mhamann, @kompot, @cryptoquick, @sarkian, @blissdev, @Thimoteus, @eush77, @dd1994, @berkus, @judasnow, @paulriddle, @giodamelio, @ScottMaclure, @deepsweet, @Maxim-Tuvanov, @CarterTsai, @Lordnibbler, @ismay, @OtaK, @nicksergeant, @SeeThruHead, @halhenke, @jerray, @therocketforever, @colinmeinke, @MadMub, @barberousse, @karlbateman, @benmarten, @mistadikay, @AdamCanady, @bheesham, @jboulouloubi, @moretti, @adri, @RFS4ever, @hcevns, @zhongxingdou, @marceloboeira, @musically-ut, @fuzetsu, @makotot, @tomekwi, @jeffbcross (dear me, an Angular.js committer?! *o*), @olessavluk, @imposibrus, @AndreTheHunter, @volodymyrkoval, @denji, @nemoDreamer, @legatoo, @atesgoral, @ThomWright, @jcrben, @ZuraGuerra, @andyklimczak, @Nek, @a1ip, @alfredooo, @passerbyid, @dariuszdziuk (hello Spotify, listening with you right this moment), @lordzfc, @StepanKuzmin, @joshhunt, @daniel-shin1104, @michalmarczyk, and @knappg.

Thanks to @creationix for creating NVM.

Thanks to all those on the creationix/nvm#303 thread.

Thanks to @alxcenz for being a constant inspiration and a friend.

Thanks to @makoConstruct for visions of a better future.

Thanks to all of Merveilles for reasons.

Thanks to Saf for being a bright star shining always.

Thanks to Léa. Je t'aime.

Thanks to my parents for letting me code until the wee hours of the morning. To Dad for giving me help with Logo. That turtle is the best thing that's happened to my programming.

Thanks to all you awesome people, past present and future.

…okay, that got long and involved and a bit over the top. It's been humbling to have all these people on a project. Have a good day, friends.
Latest commit 691980b Jul 25, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
CODE_OF_CONDUCT.md Add Code of Conduct Jun 23, 2015
README.md Thank you all Jul 25, 2015
nvm.fish Cut v1.2.2 Jun 26, 2015


NVM fish wrapper

GitHub tagLicenseCode of Conduct

A heads-up that someone has gone and created a generic fish wrapper for bash utilities, which probably works much better than this. It's called bass and it's everything I wanted to do with this project, but done right. I think that's the end of nvm-fish-wrapper. It's been a good ride! Thank you all and go have wonderful further adventures with fish, Node.js, and nvm!

NVM wrapper for the fish shell.

All nvm really does to the shell is modify $PATH, $MANPATH, and a bunch of $NVM_* vars. No binstubs afaics. — https://twitter.com/passcod/status/563948458382331905

So creating a fish wrapper for it is really simple and will work forever. Why did people do anything else. Github incoming. — https://twitter.com/passcod/status/563948749395742721


You need bash, fish, git, grep, cut, env, mktemp, and test. Unless you have a weird environment, the last five should be there already. If you don't have fish then I'm not sure what you're doing here. Git is required for installing and updating, but you could conceivably copy things in place, whatever. Bash is required for running, but you'll never need to touch it.

Start by installing nvm the manual way:

~> git clone https://github.com/creationix/nvm.git ~/.nvm
~> cd ~/.nvm
~/.nvm> git checkout (git describe --abbrev=0 --tags)

If you're on OS X, you can also install nvm using Homebrew:

~> brew install nvm
~> mkdir ~/.nvm
~> ln -s (brew --prefix nvm)/nvm.sh ~/.nvm/nvm.sh

You'll need to add set -x NVM_DIR ~/.nvm before sourcing nvm.fish (below) for the wrapper to work with the brew-installed nvm [1].

Note: I can't test on OS X, so there are several open bugs at the moment I cannot address by myself. These bugs seem to only be Homebrew-related, so if you don't use Homebrew or don't have Homebrew coreutils or didn't install nvm using Homebrew or some combination of the three, chances are pretty good that it works!

You don't need to source anything or add stuff to .bashrc.

Then install the wrapper:

~> cd ~/.config/fish
~/.c/fish> git clone git://github.com/passcod/nvm-fish-wrapper.git nvm-wrapper

Finally edit your config.fish and add this line:

source ~/.config/fish/nvm-wrapper/nvm.fish

And reload your shells.


Just use nvm as you would in other shells, e.g.

~> nvm install iojs
################################################### 100.0%
WARNING: checksums are currently disabled for io.js
Now using io.js v2.3.1

~> node -v

~> nvm use stable
Now using node v0.12.5

~> node -v


Made by Félix Saparelli, released in the Public Domain (or CC0-1.0 if Public Domain dedications are disallowed or limited in your jurisdiction).

Also made possible by the contributors and the many more people using it.