Adding an `nvm --version` command

master
Jordan Harband 2014-03-20 23:19:47 -07:00
parent 1ded21c10d
commit 31c5406780
2 changed files with 7 additions and 3 deletions

View File

@ -6,13 +6,13 @@ First you'll need to make sure your system has a c++ compiler. For OSX, XCode w
### Install script ### Install script
To install you could use the [install script](https://github.com/creationix/nvm/blob/master/install.sh) (requires Git) using cURL: To install you could use the [install script](https://github.com/creationix/nvm/blob/v0.3.0/install.sh) (requires Git) using cURL:
curl https://raw.github.com/creationix/nvm/master/install.sh | sh curl https://raw.github.com/creationix/nvm/v0.3.0/install.sh | sh
or Wget: or Wget:
wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh wget -qO- https://raw.github.com/creationix/nvm/v0.3.0/install.sh | sh
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile` or `~/.profile`).</sub> <sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile` or `~/.profile`).</sub>

4
nvm.sh
View File

@ -188,6 +188,7 @@ nvm() {
echo echo
echo "Usage:" echo "Usage:"
echo " nvm help Show this message" echo " nvm help Show this message"
echo " nvm --version Print out the latest released version of nvm"
echo " nvm install [-s] <version> Download and install a <version>, [-s] from source" echo " nvm install [-s] <version> Download and install a <version>, [-s] from source"
echo " nvm uninstall <version> Uninstall a version" echo " nvm uninstall <version> Uninstall a version"
echo " nvm use <version> Modify PATH to use <version>" echo " nvm use <version> Modify PATH to use <version>"
@ -541,6 +542,9 @@ nvm() {
"version" ) "version" )
nvm_version $2 nvm_version $2
;; ;;
"--version" )
echo "nvm v0.3.0"
;;
* ) * )
nvm help nvm help
;; ;;