clap/clap_generate/examples/bash_completion.rs
Ed Page 1bbfd956aa test: Harden tests against trailing whitespace
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.
2021-10-11 10:44:48 -05:00

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