GitXplorerGitXplorer
p

nvm-fish-wrapper

public
185 stars
10 forks
0 issues

Commits

List of commits on branch master.
Unverified
b583c8d5600a55bd9c9b8eda945dd792c50cdaba

OSX issues sem to only be for Homebrew

ppasscod committed 10 years ago
Unverified
89bd5ac26ec9c5fae985c965c5ba547246e44665

Markdown fix

ppasscod committed 10 years ago
Unverified
4acf0c4d9a5eaea26ac808fe22246670ea306fb9

Add Homebrew-specific fix

ppasscod committed 10 years ago
Unverified
96a8dd93340ebfda07f06cd78a4b2518c3239c99

Link to OS X issues, expand 'Etc' section

ppasscod committed 10 years ago
Unverified
3009b7d49276f110517d33f13d353990461bc583

Mention current OS X issues

ppasscod committed 10 years ago
Unverified
1e58a76cfc0816db474648860f1de9d4447215c1

Fix #7: set default manpath if empty

ppasscod committed 10 years ago

README

The README file for this repository.

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

Installing

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.

Using

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
v2.3.1

~> nvm use stable
Now using node v0.12.5

~> node -v
v0.12.5

Etc

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.