keyhog 0.5.40

keyhog: detects leaked credentials in source trees, git history, and cloud storage
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! `keyhog completion <shell>` - print a shell completion script to stdout.
//!
//! Standard tooling for any clap-based CLI. Pipe to a shell-specific
//! location:
//!
//! ```text
//! keyhog completion bash > /usr/share/bash-completion/completions/keyhog
//! keyhog completion zsh  > "${fpath[1]}/_keyhog"
//! keyhog completion fish > ~/.config/fish/completions/keyhog.fish
//! ```

use crate::args::{self, CompletionArgs};

pub fn run(args: CompletionArgs) {
    let mut cmd = args::command();
    let bin_name = cmd.get_name().to_string();
    clap_complete::generate(args.shell, &mut cmd, bin_name, &mut std::io::stdout());
}