clap/clap_generate/examples/bash_completion.rs
2020-02-07 07:52:04 +01:00

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());
}