npm-completion.1 999 B

1234567891011121314151617181920212223242526272829303132333435
  1. .TH "NPM-COMPLETION" "1" "March 2026" "NPM@11.12.0" ""
  2. .SH "NAME"
  3. \fBnpm-completion\fR - Tab Completion for npm
  4. .SS "Synopsis"
  5. .P
  6. .RS 2
  7. .nf
  8. npm completion
  9. .fi
  10. .RE
  11. .P
  12. Note: This command is unaware of workspaces.
  13. .SS "Description"
  14. .P
  15. Enables tab-completion in all npm commands.
  16. .P
  17. The synopsis above loads the completions into your current shell. Adding it to your ~/.bashrc or ~/.zshrc will make the completions available everywhere:
  18. .P
  19. .RS 2
  20. .nf
  21. npm completion >> ~/.bashrc
  22. npm completion >> ~/.zshrc
  23. .fi
  24. .RE
  25. .P
  26. You may of course also pipe the output of \fBnpm completion\fR to a file such as \fB/usr/local/etc/bash_completion.d/npm\fR or \fB/etc/bash_completion.d/npm\fR if you have a system that will read that file for you.
  27. .P
  28. When \fBCOMP_CWORD\fR, \fBCOMP_LINE\fR, and \fBCOMP_POINT\fR are defined in the environment, \fBnpm completion\fR acts in "plumbing mode", and outputs completions based on the arguments.
  29. .SS "See Also"
  30. .RS 0
  31. .IP \(bu 4
  32. npm help developers
  33. .IP \(bu 4
  34. npm help npm
  35. .RE 0