Skip to main content

Module formatting

Module formatting 

Source
Expand description

Help text formatting utilities.

This module provides the HelpFormatter struct for creating well-formatted help output for CLI commands, including proper text wrapping, indentation, and definition list formatting.

Structs§

HelpFormatter
Help text formatter with terminal-aware wrapping.

Functions§

detect_terminal_width
Detect the terminal width.
get_terminal_width
Get terminal width with a fallback default.
make_rule
Create a horizontal rule of the specified character.
split_into_lines
Split text into lines that fit within the specified width.
truncate_text
Truncate text to fit within width, adding ellipsis if needed.
wrap_text
Wrap text to fit within the specified width.