blob: 51f6bb2eb0d097d8d187647b20910cc0ef55284e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
extern mod term;
fn main () {
if term::ios::isatty() {
let (rows, cols) = term::ios::size();
io::println(fmt!("tty: %d %d", rows as int, cols as int));
}
else {
io::println("not tty");
}
}
|