1 2 3 4 5 6 7 8 9 10
extern mod term; fn main () { if term::ios::isatty() { io::println("tty"); } else { io::println("not tty"); } }