Skip to main content

configure_cli_command

Function configure_cli_command 

Source
pub fn configure_cli_command(
    command: Command,
    stdout_is_terminal: bool,
) -> Command
Expand description

Attaches the generated help byline to a clap command.

The byline text is produced by help_byline using stdout_is_terminal and is applied via Command::before_help.

ยงExamples

let cmd = clap::Command::new("app");
let cmd = runner::configure_cli_command(cmd, true);
assert!(cmd.get_before_help().is_some());