mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 15:22:30 +00:00
12 lines
301 B
Bash
12 lines
301 B
Bash
|
use clap::App;
|
||
|
use clap_generate::{generate, generators::Bash};
|
||
|
use std::io;
|
||
|
|
||
|
fn main() {
|
||
|
let mut app = App::new("myapp")
|
||
|
.subcommand(App::new("test").subcommand(App::new("config")))
|
||
|
.subcommand(App::new("hello"));
|
||
|
|
||
|
generate::<Bash, _>(&mut app, "myapp", &mut io::stdout());
|
||
|
}
|