logicaffeine-cli 0.10.1

largo — the LOGOS build tool: new/init/build/run/check/verify/publish for logicaffeine projects
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! `largo completions` — shell completion script generation.

use clap::CommandFactory;
use clap_complete::Shell;

/// Handle `largo completions <shell>`: write the completion script to stdout.
pub(crate) fn cmd_completions(shell: Shell) -> Result<(), Box<dyn std::error::Error>> {
    let mut cmd = crate::cli::Cli::command();
    clap_complete::generate(shell, &mut cmd, "largo", &mut std::io::stdout());
    Ok(())
}