Skip to main content

Module help

Module help 

Source
Expand description

Help and version printing helpers for CLI entry points. Help and version printing helpers for CLI tools.

Provides two diverging functions that print to stdout and exit:

  • print_help(text: &str) -> ! — colorize and print a help string, then exit 0
  • print_version(version_str: &str) -> ! — print a version string, then exit 0

Both functions are intended to be called from argument parsing code when -h/--help or --version flags are detected.

Functions§

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