11cb0ef41Sopenharmony_ci---
21cb0ef41Sopenharmony_cititle: npm-completion
31cb0ef41Sopenharmony_cisection: 1
41cb0ef41Sopenharmony_cidescription: Tab Completion for npm
51cb0ef41Sopenharmony_ci---
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci### Synopsis
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci```bash
101cb0ef41Sopenharmony_cinpm completion
111cb0ef41Sopenharmony_ci```
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ciNote: This command is unaware of workspaces.
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ci### Description
161cb0ef41Sopenharmony_ci
171cb0ef41Sopenharmony_ciEnables tab-completion in all npm commands.
181cb0ef41Sopenharmony_ci
191cb0ef41Sopenharmony_ciThe synopsis above
201cb0ef41Sopenharmony_ciloads the completions into your current shell.  Adding it to
211cb0ef41Sopenharmony_ciyour ~/.bashrc or ~/.zshrc will make the completions available
221cb0ef41Sopenharmony_cieverywhere:
231cb0ef41Sopenharmony_ci
241cb0ef41Sopenharmony_ci```bash
251cb0ef41Sopenharmony_cinpm completion >> ~/.bashrc
261cb0ef41Sopenharmony_cinpm completion >> ~/.zshrc
271cb0ef41Sopenharmony_ci```
281cb0ef41Sopenharmony_ci
291cb0ef41Sopenharmony_ciYou may of course also pipe the output of `npm completion` to a file
301cb0ef41Sopenharmony_cisuch as `/usr/local/etc/bash_completion.d/npm` or 
311cb0ef41Sopenharmony_ci`/etc/bash_completion.d/npm` if you have a system that will read 
321cb0ef41Sopenharmony_cithat file for you.
331cb0ef41Sopenharmony_ci
341cb0ef41Sopenharmony_ciWhen `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the
351cb0ef41Sopenharmony_cienvironment, `npm completion` acts in "plumbing mode", and outputs
361cb0ef41Sopenharmony_cicompletions based on the arguments.
371cb0ef41Sopenharmony_ci
381cb0ef41Sopenharmony_ci### See Also
391cb0ef41Sopenharmony_ci
401cb0ef41Sopenharmony_ci* [npm developers](/using-npm/developers)
411cb0ef41Sopenharmony_ci* [npm](/commands/npm)
42