Trait IsTty
Other items incrossterm::tty
pub trait IsTty { fn is_tty(&self) -> bool; }
Adds the is_tty method to types that might represent a terminal
is_tty
use std::io::stdout; use crossterm::tty::IsTty; let is_tty: bool = stdout().is_tty();
fn is_tty(&self) -> bool
Returns true when an instance is a terminal teletype, otherwise false.
impl<S: AsRawFd> IsTty for S
On unix, the isatty() function returns true if a file descriptor is a terminal.
isatty()