Skip to main content

print_help

Function print_help 

Source
pub fn print_help(text: &str) -> !
Expand description

Colorize text with a left-to-right rainbow spanning the current terminal width, print it to stdout, and exit with code 0.

This is the standard help-printing pattern shared by CLI tools in this ecosystem. Call it when -h or --help is detected.

§Example

if args.iter().any(|a| a == "-h" || a == "--help") {
    jt_consoleutils::help::print_help(&build_help_text());
}