4 [[ -f "$NVM_DIR/nvm.sh" ]] || return 0
6 local -a _1st_arguments
9 '--version:print out the latest released version of nvm'
10 'install:download and install a version in <node|iojs|node version number>'
11 'install-latest-npm:download and install the latest npm version'
12 'uninstall:uninstall a version'
13 'use:modify PATH to use <version>. Uses .nvmrc if available'
14 'exec:run <command> on <version>. Uses .nvmrc if available'
15 'run:run `node` on <version> with <args> as arguments. Uses .nvmrc if available'
16 'current:list installed versions'
17 'ls:list installed versions or versions matching a given description'
18 'version:resolve the given description to a single local version'
19 'version-remote:resolve the given description to a single remote version'
20 'ls-remote:list remote versions available for install'
21 'deactivate:undo effects of `nvm` on current shell'
22 'alias:show or set aliases'
23 'unalias:deletes an alias'
24 'reinstall-packages:reinstall global `npm` packages contained in <version> to current version'
25 'unload:unload `nvm` from shell'
26 'which:display path to installed node version. Uses .nvmrc if available'
29 _arguments -C '*:: :->subcmds' && return 0
31 if (( CURRENT == 1 )); then
32 _describe -t commands "nvm subcommand" _1st_arguments