Skip to content

Commit

Permalink
fix: default cmd help types (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Dec 18, 2024
1 parent a6a86a0 commit 9f4e3f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/docs/cli/templates/spec_template_long.tera
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Commands:
{%- for name, cmd in cmd.subcommands %}
{{ cmd.usage | trim }}
{%- if cmd.aliases %} [aliases: {{ cmd.aliases | join(sep=", ") }}]{% endif %}
{%- set help = cmd.help_long | default(value=cmd.help) %}
{%- set help = cmd.help_long | default(value=cmd.help | default(value='')) %}
{%- if help %}
{{ help | indent(width=4) }}
{%- endif %}
Expand All @@ -25,7 +25,7 @@ Commands:
Arguments:
{%- for arg in cmd.args %}
{{ arg.usage | trim }}
{%- set help = arg.help_long | default(value=arg.help) %}
{%- set help = arg.help_long | default(value=arg.help | default(value='')) %}
{%- if help %}
{{ help | indent(width=2) }}
{%- endif %}
Expand All @@ -41,7 +41,7 @@ Flags:
{%- for flag in cmd.flags %}
{{ flag.usage | trim }}
{%- if flag.aliases %} [aliases: {{ flag.aliases | join(sep=", ") }}]{% endif %}
{%- set help = flag.help_long | default(value=flag.help) %}
{%- set help = flag.help_long | default(value=flag.help | default(value='')) %}
{%- if help %}
{{ help | indent(width=2) }}
{%- endif %}
Expand Down

0 comments on commit 9f4e3f8

Please sign in to comment.