fix whitespace....again....

This commit is contained in:
Daylin Morgan 2024-11-14 14:36:53 -06:00
parent 447362793e
commit fef319ee52
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 8 additions and 5 deletions

View file

@ -104,22 +104,24 @@ func render*(cli: HwylCliHelp, subcmd: HwylSubCmdHelp): string =
func render*(cli: HwylCliHelp): string = func render*(cli: HwylCliHelp): string =
if cli.header != "": if cli.header != "":
result.add cli.header result.add cli.header
if cli.usage != "":
result.add "\n\n" result.add "\n\n"
if cli.usage != "":
result.add "[" & cli.styles.header & "]" result.add "[" & cli.styles.header & "]"
result.add "usage[/]:\n" result.add "usage[/]:\n"
result.add indent(cli.usage, 2 ) result.add indent(cli.usage, 2 )
result.add "\n"
if cli.description != "": if cli.description != "":
result.add "\n\n" result.add "\n"
result.add cli.description result.add cli.description
result.add "\n"
if cli.subcmds.len > 0: if cli.subcmds.len > 0:
result.add "\n\n" result.add "\n"
result.add "[" & cli.styles.header & "]" result.add "[" & cli.styles.header & "]"
result.add "subcommands[/]:\n" result.add "subcommands[/]:\n"
for s in cli.subcmds: for s in cli.subcmds:
result.add cli.render(s) result.add cli.render(s)
result.add "\n"
if cli.flags.len > 0: if cli.flags.len > 0:
result.add "\n\n"
result.add "[" & cli.styles.header & "]" result.add "[" & cli.styles.header & "]"
result.add "flags[/]:\n" result.add "flags[/]:\n"
for f in cli.flags: for f in cli.flags:

View file

@ -33,7 +33,8 @@ hwylCli:
echo fmt"{yes=}, {color=}" echo fmt"{yes=}, {color=}"
subcommands: subcommands:
[one] [one]
... """ help:
description """
the first subcommand the first subcommand
this command features both an enum flag and a Count flag this command features both an enum flag and a Count flag