Skip to content

pPretty detected tty for whether to enable color or not #46

@juhp

Description

@juhp

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions