Skip to main content

detect_from

Function detect_from 

Source
pub fn detect_from(
    vars: &impl Fn(&str) -> Option<String>,
    platform: TerminalPlatform,
) -> TerminalCaps
Expand description

Detects terminal graphics capabilities from an injectable environment.

This testable core models an interactive standard output; detect uses the real stdout TTY state for pi-tui’s fallback-protocol gate. Empty strings have the same meaning as absent variables, matching JavaScript truthiness.