You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example if one outputs to a pipe, file or Emacs shell-command etc, then the ANSI color control characters are visible , so it would be better to detect whether one is using a TTY terminal or not and depending on that decide whether to enable color or not in the default output.
The text was updated successfully, but these errors were encountered:
cdepillabout
changed the title
IWBNI pPretty detected tty for whether to enable color or not
pPretty detected tty for whether to enable color or not
Jul 21, 2019
If nobody else feels like doing so, I will try doing this in the evening (GMT+2).
We should probably add functions that always print colored output, even outside TTYs, and also the tracing functions should somehow do the detection too, right?
For example if one outputs to a pipe, file or Emacs
shell-command
etc, then the ANSI color control characters are visible , so it would be better to detect whether one is using a TTY terminal or not and depending on that decide whether to enable color or not in the default output.One can do this by using say https://hackage.haskell.org/package/base-4.12.0.0/docs/System-IO.html#v:hIsTerminalDevice
The text was updated successfully, but these errors were encountered: