You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importclick@click.group()defcli():
pass@cli.command()@click.option("--name", default="World", help="Name of the person to greet.")defhello(name):
click.echo(f"Hello, {name}!")
@cli.command()defgoodbye():
click.echo("Goodbye!")
if__name__=="__main__":
cli()
Providing suggestions works well for options:
$ python clickfoo.py hello --namee
Usage: clickfoo.py hello [OPTIONS]
Try 'clickfoo.py hello --help'for help.
Error: No such option: --namee Did you mean --name?
But not for subcommands:
$ python clickfoo.py hellow
Usage: clickfoo.py [OPTIONS] COMMAND [ARGS]...
Try 'clickfoo.py --help'for help.
Error: No such command'hellow'.
Desired output:
$ python clickfoo.py hellow
Usage: clickfoo.py [OPTIONS] COMMAND [ARGS]...
Try 'clickfoo.py --help'for help.
Error: No such command'hellow'. Did you mean `hello`?
Is this something that can be done with click?
The text was updated successfully, but these errors were encountered:
Example app:
Providing suggestions works well for options:
But not for subcommands:
Desired output:
Is this something that can be done with click?
The text was updated successfully, but these errors were encountered: