Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to configure "COMMAND" or [ARGS] metavars when using click.Group #2806

Open
gaston-haro opened this issue Nov 12, 2024 · 0 comments
Open

Comments

@gaston-haro
Copy link

When using click.Group you can customize options and arguments metavars but you cannot customize the COMMANDS autogenerated metavar in help output when you add commands to the group.

@click.group(options_metavar='<options>')
def cli():
    """A random set of productivity shortcuts"""
    pass

@cli.command(short_help='Some subcommand')
def commA():
    click.echo('This is subcommand A')

It would output:

Usage: cli <options> COMMAND [ARGS]...

  A random set of productivity shortcuts

Options:
  --help  Show this message and exit.

Commands:
  comma  Some subcommand

Resuling in inconsistencies between "", "COMMAND" and "[ARGS]". I would like to be able to produce:

Usage: cli <options> command [args]...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant