From 517cabe8ec54d0bf5f5f9cc9089d76a1fad7bb6a Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 7 Nov 2021 23:09:34 +0100 Subject: initial commit with PoC --- src/cli.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/cli.rs (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..30e771a --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,21 @@ +use clap::{AppSettings, Parser}; + +// TODO: document + +#[derive(Debug, Parser)] +#[clap(setting = AppSettings::InferSubcommands)] +pub struct Cli { + #[clap(short, long, default_value = "pdbook.toml")] + pub config: String, + #[clap(short, long)] + pub quiet: bool, + #[clap(short, long, parse(from_occurrences))] + pub verbose: u8, + #[clap(subcommand)] + pub subcommand: SubCommand, +} + +#[derive(Debug, Parser)] +pub enum SubCommand { + Build, +} -- cgit v1.2.3