mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 07:12:32 +00:00
11 lines
292 B
Rust
11 lines
292 B
Rust
use clap::App;
|
|
use clap_complete::{generate, shells::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());
|
|
}
|