mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
11 lines
301 B
Rust
11 lines
301 B
Rust
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());
|
|
}
|