mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
11 lines
312 B
Rust
11 lines
312 B
Rust
use clap::Command;
|
|
use clap_complete::{generate, shells::Bash};
|
|
use std::io;
|
|
|
|
fn main() {
|
|
let mut cmd = Command::new("myapp")
|
|
.subcommand(Command::new("test").subcommand(Command::new("config")))
|
|
.subcommand(Command::new("hello"));
|
|
|
|
generate(Bash, &mut cmd, "myapp", &mut io::stdout());
|
|
}
|