Tweaking formatting of help output; adding `nvm exec` example.

master
Jordan Harband 2014-11-22 10:45:53 -08:00
parent 689c52c90d
commit c33074cb54
1 changed files with 22 additions and 21 deletions

43
nvm.sh
View File

@ -531,31 +531,32 @@ nvm() {
echo "Node Version Manager" echo "Node Version Manager"
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 --version Print out the latest released version of nvm"
echo " nvm install [-s] <version> Download and install a <version>, [-s] from source. Uses .nvmrc if available" echo " nvm install [-s] <version> Download and install a <version>, [-s] from source. Uses .nvmrc if available"
echo " nvm uninstall <version> Uninstall a version" echo " nvm uninstall <version> Uninstall a version"
echo " nvm use <version> Modify PATH to use <version>. Uses .nvmrc if available" echo " nvm use <version> Modify PATH to use <version>. Uses .nvmrc if available"
echo " nvm run <version> [<args>] Run <version> with <args> as arguments. Uses .nvmrc if available for <version>" echo " nvm run <version> [<args>] Run <version> with <args> as arguments. Uses .nvmrc if available for <version>"
echo " nvm current Display currently activated version" echo " nvm current Display currently activated version"
echo " nvm ls List installed versions" echo " nvm ls List installed versions"
echo " nvm ls <version> List versions matching a given description" echo " nvm ls <version> List versions matching a given description"
echo " nvm ls-remote List remote versions available for install" echo " nvm ls-remote List remote versions available for install"
echo " nvm deactivate Undo effects of NVM on current shell" echo " nvm deactivate Undo effects of \`nvm\` on current shell"
echo " nvm alias [<pattern>] Show all aliases beginning with <pattern>" echo " nvm alias [<pattern>] Show all aliases beginning with <pattern>"
echo " nvm alias <name> <version> Set an alias named <name> pointing to <version>" echo " nvm alias <name> <version> Set an alias named <name> pointing to <version>"
echo " nvm unalias <name> Deletes the alias named <name>" echo " nvm unalias <name> Deletes the alias named <name>"
echo " nvm copy-packages <version> Install global NPM packages contained in <version> to current version" echo " nvm copy-packages <version> Install global \`npm\` packages contained in <version> to current version"
echo " nvm unload Unload NVM from shell" echo " nvm unload Unload \`nvm\` from shell"
echo echo
echo "Example:" echo "Example:"
echo " nvm install v0.10.24 Install a specific version number" echo " nvm install v0.10.32 Install a specific version number"
echo " nvm use 0.10 Use the latest available 0.10.x release" echo " nvm use 0.10 Use the latest available 0.10.x release"
echo " nvm run 0.10.24 myApp.js Run myApp.js using node v0.10.24" echo " nvm run 0.10.32 app.js Run app.js using node v0.10.32"
echo " nvm alias default 0.10.24 Set default node version on a shell" echo " nvm exec 0.10.32 node app.js Run \`node app.js\` with the PATH pointing to node v0.10.32"
echo " nvm alias default 0.10.32 Set default node version on a shell"
echo echo
echo "Note:" echo "Note:"
echo " to remove, delete, or uninstall nvm - just remove ~/.nvm, ~/.npm, and ~/.bower folders" echo " to remove, delete, or uninstall nvm - just remove ~/.nvm, ~/.npm, and ~/.bower folders"
echo echo
;; ;;