Documentation
¶
Overview ¶
Package terminal decides what the CLI writes to a terminal: whether a stream is a terminal that acts on escape sequences, and whether output to it is colored.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEscapeTerminal ¶
IsEscapeTerminal reports whether w is a terminal that acts on escape sequences, such as colors and the progress line's clearing: a terminal whose TERM is not dumb, the name of a terminal that acts on none, and whose escape processing is on, which turnOnEscapes turns on where it is off, as on an old Windows console. Output to anything else, or to a console whose processing cannot be turned on, has no escape sequences.
func UseColor ¶
UseColor reports whether the command colors what it writes to w: only when w is a terminal that acts on escape sequences and the user did not turn colors off, with --no-color or with the NO_COLOR environment variable set to a non-empty value (https://no-color.org). Logs, stderr notices and the listen commands' output all follow it.
Types ¶
This section is empty.