Skip to content

Add markdown reference generator - #39

Merged
laulauland merged 3 commits into
mainfrom
add-markdown-reference
Jun 21, 2023
Merged

laulauland merged 3 commits into
mainfrom
add-markdown-reference

Conversation

@laulauland

Copy link
Copy Markdown
Member

This update adds a markdown reference generator to the CLI.

@laulauland
laulauland requested a review from hatchan June 20, 2023 14:38
Comment thread src/bin/am/commands.rs Outdated
SubCommands::System(args) => system::handle_command(args).await,
Some(SubCommands::Start(args)) => start::handle_command(args).await,
Some(SubCommands::System(args)) => system::handle_command(args).await,
None => return Ok(()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this possible to occur? Shouldn't we print the usage in this case?

Comment thread src/bin/am/commands.rs Outdated
#[command(subcommand)]
pub command: SubCommands,
pub command: Option<SubCommands>,
#[clap(long, hide = true)]

@mellowagain mellowagain Jun 21, 2023 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can make this required_unless_present = "command" or the other way around (command is required unless markdown_help is present)

https://docs.rs/clap/latest/clap/struct.Arg.html#method.required_unless_present

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can also make it a sub-command 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, making it a subcommand makes the most sense

@laulauland
laulauland merged commit 77fd04d into main Jun 21, 2023
@laulauland
laulauland deleted the add-markdown-reference branch June 21, 2023 11:35
@laulauland laulauland linked an issue Jun 22, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create reference docs in a markdown file

3 participants