Fix: common: improve color support handling
With this patch, terminal color codes are emitted by Babeltrace modules
if the `BABELTRACE_TERM_COLOR` environment variable is set to `ALWAYS`
or if all the following conditions are satisfied:
1. The `BABELTRACE_TERM_COLOR` environement variable is not set to
`NEVER`.
2. The `TERM` environment variable starts with `xterm`, `rxvt`,
`konsole`, `gnome`, `screen`, `tmux`, or `putty`.
3. For both the standard output and error streams: its file descriptor
is a TTY.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025659 seconds and 4 git commands to generate.