mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Added all commands to npm plugin
This commit is contained in:
parent
23556491e6
commit
6111779682
2 changed files with 68 additions and 0 deletions
64
plugins/npm/_npm
Normal file
64
plugins/npm/_npm
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
#compdef npm
|
||||
#autoload
|
||||
|
||||
# npm zsh completion, based on brew completion plugin
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'activate:'
|
||||
'adduser:'
|
||||
'bn:'
|
||||
'bundle:'
|
||||
'c:'
|
||||
'cache:'
|
||||
'config:'
|
||||
'deactivate:'
|
||||
'deprecate:'
|
||||
'docs:'
|
||||
'edit:'
|
||||
'explore:'
|
||||
'faq:'
|
||||
'find:'
|
||||
'get:'
|
||||
'help:'
|
||||
'i:'
|
||||
'info:'
|
||||
'init:'
|
||||
'install:'
|
||||
'link:'
|
||||
'list:'
|
||||
'ln:'
|
||||
'ls:'
|
||||
'outdated:'
|
||||
'owner:'
|
||||
'publish:'
|
||||
'r:'
|
||||
'rb:'
|
||||
'rebuild:'
|
||||
'rm:'
|
||||
'run-script:'
|
||||
'search:'
|
||||
'set:'
|
||||
'start:'
|
||||
'stop:'
|
||||
'tag:'
|
||||
'test:'
|
||||
'un:'
|
||||
'uninstall:'
|
||||
'unpublish:'
|
||||
'up:'
|
||||
'update:'
|
||||
'version:'
|
||||
'view:'
|
||||
'xmas:'
|
||||
)
|
||||
|
||||
local expl
|
||||
|
||||
_arguments \
|
||||
'*:: :->subcmds' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "npm subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
4
plugins/npm/npm.plugin.zsh
Normal file
4
plugins/npm/npm.plugin.zsh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# add npm completion function to path
|
||||
fpath=($ZSH/plugins/npm $fpath)
|
||||
autoload -U compinit
|
||||
compinit -i
|
||||
Loading…
Add table
Add a link
Reference in a new issue