#compdef npm #autoload # npm zsh completion, based on brew completion plugin local -a _1st_arguments _1st_arguments=( 'activate:Activate an installed version of a package' 'adduser:Add a registry user account' 'bundle:Bundle package dependencies' 'bn:Bundle package dependencies' 'c:Mange the npm configuration file' 'cache:Work with npm cache' 'config:Manage the npm configuration file' 'deactivate:Deactivate the active version of a package' 'deprecate:Deprecate a version of a package' 'docs:Docs for a package in a web browser (experimental)' 'edit:Edit an installed package' 'explore:Browse an installed package' 'faq:Frequently Asked Questions' 'find:List installed packages' 'get:Manage the npm configuration file' 'help:Provides help' 'i:Install a package' 'init:Interactively create a package.json file' 'install:Install a package' 'link:Symlink a package folder' 'ln:Symlink a package folder' 'ls:List packages that are either installed or in the registry' 'outdated:Check for outdated packages' 'owner:Manage package owners' 'publish:Publish a package' 'r:Remove a package' 'rb:Rebuild a package' 'rebuild:Rebuild a package' 'rm:Remove a package' 'run-script:Run arbitrary package scripts' 'set:Manage the npm configuration file' 'start:Start a package' 'stop:Stop a package' 'tag:Tag a published version' 'test:Test a package' 'un:Remove a package' 'uninstall:Remove a package' 'unpublish:Remove a package from the registry' 'up:Update a package' 'update:Update a package' 'version:Bump a package version' 'view:View package registry info' ) local expl _arguments \ '*:: :->subcmds' && return 0 if (( CURRENT == 1 )); then _describe -t commands "npm subcommand" _1st_arguments return fi