diff --git a/README.md b/README.md index 4f200d8..42f48d6 100644 --- a/README.md +++ b/README.md @@ -1007,6 +1007,9 @@ This is an alternative to the `pwd` built-in. ## Check if input is from a terminal +This is an alternative to `tty` when you don't necessarily need to know +the terminal file name, just whether it is a terminal at all. + You can test whether file descriptor 0 (i.e. standard input) is open on a terminal using `[ -t 0 ]`. This test fails if input is redirected from a file (`file`) or a pipe (`|cmd`).