clap/clap_derive/tests/ui/multiple_external_subcommand.rs
2020-04-30 20:20:21 +03:00

21 lines
321 B
Rust

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