Crate atty

source · []
Expand description

atty is a simple utility that answers one question

is this a tty?

usage is just as simple

if atty::is(atty::Stream::Stdout) {
  println!("i'm a tty")
}
if atty::isnt(atty::Stream::Stdout) {
  println!("i'm not a tty")
}

Enums

possible stream sources

Functions

returns true if this is a tty

returns true if this is not a tty