Giter Site home page Giter Site logo

nvm-fish-wrapper's Introduction

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.

nvm-fish-wrapper's People

Contributors

passcod avatar brandonweiss avatar lnikkila avatar

Watchers

Adam Dymitruk avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.