mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
1bbfd956aa
In a follow up commit, my editor stripped trailing whitespace. Rather than have everyone fight this, let's not make a deal over the small stuff.
11 lines
296 B
Rust
11 lines
296 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());
|
|
}
|