Make programs think their stdout is a tty / terminal.
C CMake
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CMakeLists.txt
LICENSE
README.rst
libstdoutisatty.c
stdoutisatty.c

README.rst

Make programs think their stdout is a tty / terminal.

Build & Install

$ mkdir -p build && cd build
$ cmake ..
$ make
$ sudo make install
$ sudo ldconfig

Usage

Just prefix your command with stdoutisatty:

$ stdoutisatty ls --color=auto | less

Use a two-character environment variable ISATTY to specify whether you want stdout and/or stderr to be treated as a tty:

``ISATTY`` value  which isatty
``yy``  stdout, stderr
``y.``  stdout
``.y``  stderr

. indicates any characer other than (lower-cased) y. Only the first two characters are examined (currently).

Links