GitXplorerGitXplorer
p

nvm-fish-wrapper

public
185 stars
10 forks
0 issues

Commits

List of commits on branch master.
Unverified
691980b66b93d635d0d87629cbe7484ab1ac566b

Thank you all

ppasscod committed 9 years ago
Unverified
5ae5f8ed62d2c6e905858af985b40cfb99bd4517

Cut v1.2.2

ppasscod committed 10 years ago
Unverified
4279661930e795a2a54fdce275c26b48959822a9

Merge pull request #15 from brandonweiss/patch-1

ppasscod committed 10 years ago
Unverified
816bdac31ccc742e3dad1ec34ab7d262b9abdf49

Closes nvm-fish-wrapper/issues#14: Use “command” command to execute “rm”

bbrandonweiss committed 10 years ago
Unverified
46f8cee3ec1a1bc5c4b0a1a7511654a705180c4f

Add Code of Conduct

ppasscod committed 10 years ago
Unverified
7c77e47826921c7c073e99651b2f323126725ed2

Don't use the default nvm installed version.

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.