1 2 3 4 5 6 7 8 9 10 11
extern crate pseudoterm; use std::io; fn main() { if pseudoterm::isatty(&io::stdout()) { println!("Stdout is a TTY"); } else { println!("Stdout is *not* a TTY"); } }