Fix #1 incomplete usage descriptions
This commit is contained in:
parent
44d6b868d8
commit
6abe651e76
|
@ -27,7 +27,7 @@ def iter_commands(
|
|||
|
||||
if isinstance(cliobj, click.Group):
|
||||
if depth > 1:
|
||||
yield f"{'#'*depth} {cliobj.name}"
|
||||
yield f"{'#'*depth} {tool_name} {cliobj.name}"
|
||||
|
||||
for name in sorted(cliobj.commands):
|
||||
yield from iter_commands(
|
||||
|
@ -38,12 +38,7 @@ def iter_commands(
|
|||
cmd = f"{tool_name} {' '.join(cmd_chain)}"
|
||||
help_message = cliobj.get_help(ctx).replace(ctx.command_path, cmd)
|
||||
|
||||
if cliobj.name == "cli":
|
||||
cmd_title = "Default Command Line"
|
||||
else:
|
||||
cmd_title = cliobj.name
|
||||
|
||||
yield f"{'#'*(depth)} {tool_name} {cmd_title}\n```\n{help_message}\n```"
|
||||
yield f"{'#'*(depth)} {tool_name} {' '.join(cmd_chain)}\n```\n{help_message}\n```"
|
||||
|
||||
|
||||
def generate_usage_md(script: str, version: str):
|
||||
|
|
|
@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|||
|
||||
[tool.poetry]
|
||||
name = "clickusagemd"
|
||||
version = "0.8.5"
|
||||
version = "0.8.6"
|
||||
description = ""
|
||||
authors = ["Jules <jules@deutschebahn.com>"]
|
||||
packages = [
|
||||
|
|
Loading…
Reference in New Issue