Should we check if color is supported?
There are ways to check if color is supported. I am asking this for !399 (merged)
That mr only looks at the global but at the place where the global is set we could do some tests to see if color is supported or not. If -cti-no-color is set no color should be printed but it might be that color is not supported either way.
There are ways to detect this using env variables but of course these are only heuristics.
There is also isatty()
which we can use to see if the output is a terminal or not or a pipe. Maybe if the output is piped into another program we also want to set -cti-no-color
to true.
I would love to hear ideas on this issue.