1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 23:00:09 +00:00
ohmyzsh/plugins/nvm/_nvm

35 lines
1.3 KiB
Text
Raw Normal View History

2013-09-04 22:07:58 +00:00
#compdef nvm
#autoload
[[ -f "$NVM_DIR/nvm.sh" ]] || return 0
2013-09-04 22:07:58 +00:00
local -a _1st_arguments
_1st_arguments=(
'help:show help'
'--version:print out the latest released version of nvm'
'install:download and install a version in <node|iojs|node version number>'
'install-latest-npm:download and install the latest npm version'
2013-09-04 22:07:58 +00:00
'uninstall:uninstall a version'
'use:modify PATH to use <version>. Uses .nvmrc if available'
'exec:run <command> on <version>. Uses .nvmrc if available'
'run:run `node` on <version> with <args> as arguments. Uses .nvmrc if available'
'current:list installed versions'
2013-09-04 22:07:58 +00:00
'ls:list installed versions or versions matching a given description'
'version:resolve the given description to a single local version'
'version-remote:resolve the given description to a single remote version'
2013-09-04 22:07:58 +00:00
'ls-remote:list remote versions available for install'
'deactivate:undo effects of `nvm` on current shell'
2013-09-04 22:07:58 +00:00
'alias:show or set aliases'
'unalias:deletes an alias'
'reinstall-packages:reinstall global `npm` packages contained in <version> to current version'
'unload:unload `nvm` from shell'
'which:display path to installed node version. Uses .nvmrc if available'
2013-09-04 22:07:58 +00:00
)
_arguments -C '*:: :->subcmds' && return 0
if (( CURRENT == 1 )); then
_describe -t commands "nvm subcommand" _1st_arguments
return
fi