2025-12-16 10:20:31 -07:00
|
|
|
# npm completion
|
|
|
|
|
|
|
|
|
|
> Enable or set up tab-completion for npm commands.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://docs.npmjs.com/cli/npm-completion/>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Enable tab-completion for the current shell session:
|
|
|
|
|
|
|
|
|
|
`npm completion`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Add completion to the shell profile (Bash):
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
`npm completion >> ~/.bashrc`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Add completion to the shell profile (Zsh):
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
`npm completion >> ~/.zshrc`
|
|
|
|
|
|
|
|
|
|
- Write completions script to a specific file:
|
|
|
|
|
|
|
|
|
|
`npm completion > {{path/to/file}}`
|