clap/clap_complete_fig/examples/fig_completion.rs
2022-02-14 15:55:56 -06:00

12 lines
323 B
Rust

use clap::Command;
use clap_complete::generate;
use clap_complete_fig::Fig;
use std::io;
fn main() {
let mut cmd = Command::new("myapp")
.subcommand(Command::new("test").subcommand(Command::new("config")))
.subcommand(Command::new("hello"));
generate(Fig, &mut cmd, "myapp", &mut io::stdout());
}