better command-line argument help

This commit is contained in:
Sebastian Kuzminsky 2025-09-04 12:22:14 -06:00
parent 375fd51a45
commit a56b537ba4

View file

@ -3,7 +3,7 @@ use clap::Parser;
#[derive(Debug, clap::Parser)] #[derive(Debug, clap::Parser)]
#[command(version, about, long_about = None)] #[command(version, about, long_about = None)]
struct Args { struct Args {
/// Directories containing repos. /// Directories containing repos, eg "../my-repos".
#[arg(short, long)] #[arg(short, long)]
repo: Vec<String>, repo: Vec<String>,
@ -14,12 +14,14 @@ struct Args {
#[derive(clap::Subcommand, Debug)] #[derive(clap::Subcommand, Debug)]
enum Commands { enum Commands {
/// Produce an mdbook of the specified recipe.
Mdbook { Mdbook {
/// The name of the recipe to create MD Book for. /// The name of the recipe to create MD Book for, eg "my_widget".
target: String, target: String,
}, },
/// Show parsed recipe, probably not very useful.
Info { Info {
/// The name of the recipe to show info for. /// The name of the recipe to show info for, eg "my_widget".
target: String, target: String,
}, },
} }