yargs / yargs/yargs

Option columns in help text don't have enough separation

Open
#2,228 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
11.5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

require('yargs')
  .default('option', 'description', 'x'.repeat(59))
  .parse(['--help'])
Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --option[default: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]

Note that there is no whitespace between --option and the subsequent [default: ...]

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 by running the JavaScript reproduction with yargs and inspect how the --help output formats a long default value. Done means the generated help text includes whitespace between --option and [default: ...] without disrupting the other option rows.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.