clap/clap_complete_fig/examples/fig_completion.rs

13 lines
303 B
Rust
Raw Normal View History

use clap::App;
use clap_complete::generate;
use clap_complete_fig::Fig;
use std::io;
fn main() {
let mut app = App::new("myapp")
.subcommand(App::new("test").subcommand(App::new("config")))
.subcommand(App::new("hello"));
2021-10-12 12:57:26 +00:00
generate(Fig, &mut app, "myapp", &mut io::stdout());
}