Skip to main content

cmd_completion

Function cmd_completion 

Source
pub fn cmd_completion(
    shell: Shell,
    prog_name: &str,
    cmd: &mut Command,
) -> String
Expand description

Handler: generate a shell completion script and return it as a String.

shell — the target shell (parsed from clap argument) prog_name — the program name to embed in the script cmd — mutable reference to the root Command (required by clap_complete)