Skip to main content

is_apple_terminal

Function is_apple_terminal 

Source
pub fn is_apple_terminal(env: &dyn Env) -> bool
Expand description

Return whether env identifies Apple Terminal.

Matches TERM_PROGRAM exactly against Apple_Terminal. Callers select protocol restrictions and version-dependent behavior.

use uncurses::terminal::{EnvList, is_apple_terminal};

let env = EnvList::from_pairs([("TERM_PROGRAM", "Apple_Terminal")]);
assert!(is_apple_terminal(&env));