mi6_cli/display/
mod.rs

1//! Display utilities for mi6-cli output formatting.
2//!
3//! This module consolidates display logic into reusable components:
4//! - `terminal`: Terminal width detection and color support
5//! - `string`: String truncation helpers (UTF-8 safe)
6//! - `colors`: Color formatting helpers (bold, colored text)
7//! - `format`: Number, duration, and byte formatting
8//! - `table`: Table header and column width calculations
9//! - `event`: Event row formatting and details
10//! - `prompt`: User confirmation prompts
11
12mod colors;
13mod event;
14mod format;
15mod prompt;
16mod string;
17mod table;
18mod terminal;
19
20pub use colors::{StderrColors, bold_green, bold_red, bold_white, dark_grey};
21pub use event::{format_details, framework_abbrev, get_display_event_type, print_event_row};
22pub use format::{format_bytes, format_duration, format_number, percentage};
23pub use prompt::{confirm, confirm_stdout};
24pub use string::{truncate_from_start, truncate_str, truncate_with_prefix};
25pub use table::{
26    COL_APP, COL_DETAILS_MIN, COL_EVENT, COL_PID, COL_SESSION, COL_SOURCE, COL_TIME,
27    calculate_details_width, print_table_header,
28};
29pub use terminal::{DEFAULT_TERMINAL_WIDTH, get_terminal_width, use_colors, use_colors_stderr};