Skip to main content

generate_completions

Function generate_completions 

Source
pub fn generate_completions(shell: Shell, writer: &mut impl Write) -> Result<()>
Expand description

Write shell completions for shell to writer.

§Errors

Returns an error if writing to writer fails.

§Examples

use ironflow_cli::cli::generate_completions;
use clap_complete::Shell;

let mut buf = Vec::new();
generate_completions(Shell::Bash, &mut buf)?;
assert!(!buf.is_empty());