npm / npm/cli

[DOCS] `completion` synopsis is wrong/not-useful (v8)

Open
#4,620 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation Priority 2
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This is a CLI Docs Problem, not another kind of Docs Problem.
  • This is a CLI Docs Problem.
Description of Problem

The v8 completion synopsis was changed (via #4450) to the following (using a generic command template):

npm completion

This is autogenerated using a generic command template, but it is incorrect (at, at the very least, not useful). The v7 page has the right usage, namely:

source <(npm completion)
Potential Solution

Update describeUsage in https://github.com/npm/cli/blob/latest/scripts/config-doc-command.js to treat completion as a special case.

Affected URL

https://docs.npmjs.com/cli/v8/commands/npm-completion

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in scripts/config-doc-command.js, read describeUsage, and compare the generated v8 npm completion page with the v7 page linked in the issue. Update the completion synopsis handling so the affected documentation shows source <(npm completion) rather than the generic command template.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.