Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markdown reference generator #39

Merged
merged 3 commits into from
Jun 21, 2023
Merged

Conversation

keturiosakys
Copy link
Member

This update adds a markdown reference generator to the CLI.

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
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?

@@ -8,7 +8,9 @@ pub mod system;
#[command(author, version, about, long_about = None)]
pub struct Application {
#[command(subcommand)]
pub command: SubCommands,
pub command: Option<SubCommands>,
#[clap(long, hide = true)]
Copy link
Member

@mellowagain mellowagain Jun 21, 2023

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
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
Member

Choose a reason for hiding this comment

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

agree

Copy link
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

@keturiosakys keturiosakys merged commit 77fd04d into main Jun 21, 2023
@keturiosakys keturiosakys deleted the add-markdown-reference branch June 21, 2023 11:35
@keturiosakys keturiosakys 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