Skip to content
Snippets Groups Projects
Commit 28e0ce54 authored by Moul's avatar Moul
Browse files

Define recursively -h/--help short help (#419)

Using context ctx.help_option_names
https://click.palletsprojects.com/en/8.1.x/api/#context

Have to keep top level @click.help_option("-h", "--help") otherwise
it’s not define since the context is not yet initialized
parent 152e99f5
No related branches found
No related tags found
1 merge request!243Define recursively -h/--help short help (#419)
Pipeline #32569 passed
......@@ -149,6 +149,7 @@ def cli(
ctx.obj["AUTH_WIF"] = auth_wif
ctx.obj["DISPLAY_DOCUMENT"] = display
ctx.obj["DRY_RUN"] = dry_run
ctx.help_option_names = ["-h", "--help"]
cli.add_command(about)
......@@ -158,7 +159,6 @@ cli.add_command(license_command)
@cli.group("blockchain", help="Blockchain related commands")
@click.help_option("-h", "--help")
def blockchain_group() -> None:
pass
......@@ -170,7 +170,6 @@ blockchain_group.add_command(verify_blocks_signatures)
@cli.group("money", help="Money management related commands")
@click.help_option("-h", "--help")
def money_group() -> None:
pass
......@@ -181,7 +180,6 @@ money_group.add_command(transfer_money)
@cli.group("wot", help="Web-of-Trust related commands")
@click.help_option("-h", "--help")
def wot_group() -> None:
pass
......@@ -197,7 +195,6 @@ wot_group.add_command(status)
help="Create, save, verify or publish revocation document.\n\
Subcommands optionally take the path to the revocation document.",
)
@click.help_option("-h", "--help")
def revocation_group() -> None:
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment