Expand description
Fixed colors, OSC 8 links, and escape-aware width measuring for static output.
Constants§
Functions§
- link
- OSC 8 hyperlink. Emitted even without color: links are not styling.
- no_
color_ env - True when
NO_COLORis set to a non-empty value. - paint
- Wraps
sin an SGR sequence, or returns it unchanged whencoloris false. - sanitize
- Makes untrusted text (file names, server messages) inert: control chars (C0, DEL, C1)
become
\xNN, tab becomes a space. Prevents terminal escape injection. - strip_
escapes - Removes CSI (
ESC [ ... final) and OSC (ESC ] ... ST|BEL) sequences. - truncate
- Cuts plain text to at most
maxcolumns, ending with…when cut. - visible_
width - Display width of the visible text, ignoring escapes.