click
click copied to clipboard
Add help kwarg to argument parameter
We are now open to a PR for adding a help kwarg to arguments in the same way that there is for options and adjusting the help pages to account for this.
@click.command()
@click.argument('name', help='The name to print')
@click.option('--count', default=1, help='number of greetings')
def hello(name: str, count: int):
"""This script prints hello and a name one or more times."""
for x in range(count):
if name:
click.echo(f"Hello {name}!")
else:
click.echo("Hello!")
Hi! I'd love to work on this issue. Just to confirm: I should add a help= argument to click.argument(...) (in core.py), and then update the help formatter to display it, similar to how it's done for option(...)? If so, could I please be assigned? I'd like to give it a try.
@KarinaNi Let's try the other issue first. It is a bit more approachable.