Table of contents
npm-completion
Tab Completion for npm
Select CLI Version:
Table of contents
Synopsis
npm completion
Note: This command is unaware of workspaces.
Description
Enables tab-completion in all npm commands.
The synopsis above loads the completions into your current shell. Adding it to your ~/.bashrc or ~/.zshrc will make the completions available everywhere:
npm completion >> ~/.bashrcnpm completion >> ~/.zshrc
You may of course also pipe the output of npm completion
to a file such as /usr/local/etc/bash_completion.d/npm
or /etc/bash_completion.d/npm
if you have a system that will read that file for you.
When COMP_CWORD
, COMP_LINE
, and COMP_POINT
are defined in the environment, npm completion
acts in "plumbing mode", and outputs completions based on the arguments.
See Also
声明:npm 及相关 logo 的版权归 npmjs.com 所有。本站点仅用于 npm 中文文档,与 npmjs.com 没有任何关系。由于译者水平有限,且避免产生误解,条款和政策内容不进行翻译,关于这部分,请移步官网查看最新内容。