Expand description
TTY detection and capability utilities using crossterm’s IsTty trait.
This module provides safe and convenient TTY detection across the codebase, abstracting away platform differences for TTY detection.
§Usage
use vtcode_tui::utils::tty::TtyExt;
use std::io;
// Check if stdout is a TTY
if io::stdout().is_tty_ext() {
// Apply terminal-specific features
}
// Check if stdin is a TTY
if io::stdin().is_tty_ext() {
// Interactive input available
}Structs§
- TtyCapabilities
- TTY capabilities that can be queried for feature detection.
Traits§
- TtyExt
- Extension trait for TTY detection on standard I/O streams.
Functions§
- is_
interactive_ session - Check if the application is running in an interactive TTY context.
- terminal_
size - Get the current terminal dimensions.