pub fn is_tty<T: AsRawFd>(stream: &T) -> bool
Is this stream a TTY?
5 6 7 8 9 10 11
fn main() { if termion::is_tty(&fs::File::create("/dev/stdout").unwrap()) { println!("This is a TTY!"); } else { println!("This is not a TTY :("); } }