Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 14, 2024
1 parent b8034f5 commit 9070347
Show file tree
Hide file tree
Showing 6 changed files with 1,018 additions and 82 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 23 additions & 5 deletions cli/src/cli/generate/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const USAGE_OVERVIEW_TEMPLATE: &str = r#"
```
"#;

static CONFIG_TEMPLATE: &str = r#"
const CONFIG_TEMPLATE: &str = r#"
### `!KEY!`
!ENV!
Expand All @@ -180,13 +180,27 @@ const COMMANDS_INDEX_TEMPLATE: &str = r#"
const COMMANDS_TEMPLATE: &str = r#"
### `{{ cmd.full_cmd | join(sep=" ") }}`
{% if cmd.before_long_help -%}
{{ cmd.before_long_help }}
{% elif cmd.before_help -%}
{{ cmd.before_help }}
{% endif -%}
{% if cmd.aliases -%}
#### Aliases
{% for alias in cmd.aliases -%}
* `{{ alias }}`
{% endfor -%}
{% endif -%}
{% if cmd.args -%}
#### Args
{% for arg in cmd.args -%}
* `{{ arg.usage }}` – {{ arg.long_help | default(value=arg.help) }}
{% endfor -%}
{% endif -%}
{% endif %}
{% if cmd.flags -%}
#### Flags
Expand All @@ -196,12 +210,16 @@ const COMMANDS_TEMPLATE: &str = r#"
{% endfor -%}
{% endif -%}
{% if cmd.help -%}
{% if cmd.long_help -%}
{{ cmd.long_help }}
{% elif cmd.help -%}
{{ cmd.help }}
{% endif -%}
{% if cmd.long_help -%}
{{ cmd.long_help }}
{% if cmd.after_long_help -%}
{{ cmd.after_long_help }}
{% elif cmd.after_help -%}
{{ cmd.after_help }}
{% endif -%}
"#;

Expand Down
Loading

0 comments on commit 9070347

Please sign in to comment.