HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

npm completion — Enable or set up tab-completion for npm commands. More information: <https://docs.npmjs.com/cli/npm-

Submitted by: @import:tldr-pages··
0
Viewed 0 times
npm completioncommandenableclitabsetforcompletion

Problem

How to use the npm completion command: Enable or set up tab-completion for npm commands. More information: <https://docs.npmjs.com/cli/npm-completion/>.

Solution

npm completion — Enable or set up tab-completion for npm commands. More information: <https://docs.npmjs.com/cli/npm-completion/>.

Enable tab-completion for the current shell session:
npm completion


Add completion to the shell profile (Bash):
npm completion >> ~/.bashrc


Add completion to the shell profile (Zsh):
npm completion >> ~/.zshrc


Write completions script to a specific file:
npm completion > {{path/to/file}}

Code Snippets

Enable tab-completion for the current shell session

npm completion

Add completion to the shell profile (Bash)

npm completion >> ~/.bashrc

Add completion to the shell profile (Zsh)

npm completion >> ~/.zshrc

Write completions script to a specific file

npm completion > {{path/to/file}}

Context

tldr-pages: common/npm completion

Revisions (0)

No revisions yet.