softprops / atty

are you or are you not a tty?
MIT License
277 stars 50 forks source link

Documentation - Goal of the project #43

Closed ShalokShalom closed 3 years ago

ShalokShalom commented 4 years ago

What is atty all about?

BurntSushi commented 4 years ago

As the docs say, this crate provides an API for determining whether stdin/stdout/stderr are connected to a tty or not. A "tty" is a common abbreviation that indicates some kind of terminal that a user is interacting with, as opposed to a file or a network socket.

Knowing the answer to this question is often convenient for determining whether to emit colors or other kinds of graphics. You might want to do it on a tty, but almost certainly don't want to do it when writing to a file or a socket.

ShalokShalom commented 4 years ago

Ah, I read the Readme and the information is missing there. :) You might wanna add it? Close this here, once it's convenient for you. :)