mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 23:30:08 +00:00
Plugin for Node Version Manager
This commit is contained in:
parent
434f3bc05c
commit
e3c02bfeba
2 changed files with 27 additions and 0 deletions
24
plugins/nvm/_nvm
Normal file
24
plugins/nvm/_nvm
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#compdef nvm
|
||||||
|
#autoload
|
||||||
|
|
||||||
|
local -a _1st_arguments
|
||||||
|
_1st_arguments=(
|
||||||
|
'help:show help'
|
||||||
|
'install:download and install a version'
|
||||||
|
'uninstall:uninstall a version'
|
||||||
|
'use:modify PATH to use version'
|
||||||
|
'run:run version with given arguments'
|
||||||
|
'ls:list installed versions or versions matching a given description'
|
||||||
|
'ls-remote:list remote versions available for install'
|
||||||
|
'deactivate:undo effects of NVM on current shell'
|
||||||
|
'alias:show or set aliases'
|
||||||
|
'unalias:deletes an alias'
|
||||||
|
'copy-packages:install global NPM packages to current version'
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments -C '*:: :->subcmds' && return 0
|
||||||
|
|
||||||
|
if (( CURRENT == 1 )); then
|
||||||
|
_describe -t commands "nvm subcommand" _1st_arguments
|
||||||
|
return
|
||||||
|
fi
|
3
plugins/nvm/nvm.plugin.zsh
Normal file
3
plugins/nvm/nvm.plugin.zsh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# The addition 'nvm install' attempts in ~/.profile
|
||||||
|
|
||||||
|
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh
|
Loading…
Reference in a new issue