Skip to content

Automatically append ellipsis (...) to metavars when multiple=True in options #3652

Description

@iynehz

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help outputHelp text formatting, layout, and --help rendering

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions