mirror of
https://github.com/clap-rs/clap
synced 2024-12-16 07:42:32 +00:00
12 lines
335 B
Rust
12 lines
335 B
Rust
use clap::Command;
|
|
use clap_complete::generate;
|
|
use clap_complete_nushell::Nushell;
|
|
use std::io;
|
|
|
|
fn main() {
|
|
let mut cmd = Command::new("myapp")
|
|
.subcommand(Command::new("test").subcommand(Command::new("config")))
|
|
.subcommand(Command::new("hello"));
|
|
|
|
generate(Nushell, &mut cmd, "myapp", &mut io::stdout());
|
|
}
|