blob: d095ce6673118e4cc38ff8f48ba814f5bcd2f5fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
use clap::Args;
use clap::CommandFactory;
use clap_complete::aot::Shell;
#[derive(Args)]
pub struct CompletionArgs {
/// The shell to generate completions for
#[arg(value_enum)]
pub shell: Shell,
}
pub async fn execute(
args: &CompletionArgs,
_cli: &super::Cli,
_console: &mozart_core::console::Console,
) -> anyhow::Result<()> {
let mut cmd = super::Cli::command();
clap_complete::aot::generate(args.shell, &mut cmd, "mozart", &mut std::io::stdout());
Ok(())
}
|