Automatically append ellipsis (`...`) to metavars when `multiple=True` in options
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.7k
- Forks
- 2.3k
- Avg merge
- 1d 30m
- Merged PRs (30d)
- 18
Description
When building a command-line interface with click.option(..., multiple=True), the auto-generated usage string does not visually signal to the user that the option can be repeated. For instance, an option --foo=FOO looks identical whether it accepts single or multiple arguments. This is different from the common convention for multi-value items in shell interfaces often suggests adding an ellipsis like --foo=FOO...
Expected behavior if option "foo" has multiple=True:
Usage: script.py [OPTIONS]
Options:
--foo TEXT... A list of foo strings.
--help Show this message and exit.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace Click's auto-generated option usage string for an option configured with multiple=True, comparing it with the single-value case. Add regression coverage for the expected --foo TEXT... output and verify that ordinary options remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100