usage-lib 2.0.6

Library for working with usage specs
Documentation
{% if spec.about %}{{ spec.about }}

{% endif %}
Usage: {{ spec.bin ~ " " ~ cmd.usage | trim }}

{%- if cmd.subcommands %}

Commands:
{%- for name, cmd in cmd.subcommands %}
  {{ cmd.usage | trim }}
{%- if cmd.aliases %} [aliases: {{ cmd.aliases | join(sep=", ") }}]{% endif %}
{%- if cmd.help %}  {{ cmd.help }}{%- endif %}
{%- endfor %}
  help  Print this message or the help of the given subcommand(s)
{%- endif %}

{%- if cmd.args %}

Arguments:
{%- for arg in cmd.args %}
  {{ arg.usage | trim }}
{%- if arg.help %}  {{ arg.help }}{%- endif %}
{%- if arg.choices %} [{{ arg.choices.choices | join(sep=", ") }}]{%- endif %}
{%- endfor %}
{%- endif %}

{%- if cmd.flags %}

Flags:
{%- for flag in cmd.flags %}
  {{ flag.usage | trim }}
{%- if flag.aliases %}  [aliases: {{ flag.aliases | join(sep=", ") }}]{% endif %}
{%- if flag.help %}  {{ flag.help }}{%- endif %}
{%- if flag.arg.choices %} [{{ flag.arg.choices.choices | join(sep=", ") }}]{%- endif %}
{%- endfor %}
{%- endif -%}