From a8f1a22507cc9e917b10db2a163bd65dfb2022ce Mon Sep 17 00:00:00 2001 From: Franklin Yu Date: Wed, 28 Oct 2015 01:51:05 -0400 Subject: [PATCH 1/2] add Homebrew installation --- README.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.markdown b/README.markdown index 6f9f254..b706fd0 100644 --- a/README.markdown +++ b/README.markdown @@ -44,6 +44,14 @@ To activate nvm, you need to source it from your shell: I always add this line to my `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login. Often I also put in a line to use a specific version of node. +### Homebrew + +If you are on OS X using Homebrew, you can also install nvm with + +```shell +brew install nvm +``` + ## Usage You can create an `.nvmrc` file containing version number in the project root directory (or any parent directory). From 358506f44301cf9d8d2ba4a8e387b334b4fd6774 Mon Sep 17 00:00:00 2001 From: Franklin Yu Date: Wed, 28 Oct 2015 02:00:17 -0400 Subject: [PATCH 2/2] add bash completion for Homebrew installation --- README.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.markdown b/README.markdown index b706fd0..561b4cf 100644 --- a/README.markdown +++ b/README.markdown @@ -185,6 +185,14 @@ To activate, you need to source `bash_completion`: Put the above sourcing line just below the sourcing line for NVM in your profile (`.bashrc`, `.bash_profile`). +If you installed with Homebrew, the bash completion file is included with + +```shell +for f in $(brew --prefix nvm)/etc/bash_completion.d/*; do + source $f +done +``` + ### Usage nvm