clap/tests/derive_ui/multiple_external_subcommand.rs
Ed Page b190a6a817 test: Consolidate clap tests
This reduces the need for us to have `clap` as a dependency in
`clap_derive`, preparing the way to fix #15.
2021-11-30 10:07:08 -06:00

21 lines
327 B
Rust

use clap::Parser;
#[derive(Parser, Debug)]
struct Opt {
#[clap(subcommand)]
cmd: Command,
}
#[derive(Parser, Debug)]
enum Command {
#[clap(external_subcommand)]
Run(Vec<String>),
#[clap(external_subcommand)]
Other(Vec<String>),
}
fn main() {
let opt = Opt::parse();
println!("{:?}", opt);
}