Skip to content
Snippets Groups Projects
Commit e9ca4104 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'Terminal-clicolor'


f308fcfb Terminal: Disable color output when CLICOLOR is set to 0
bbf6cdef Terminal: Simplify CLICOLOR_FORCE check

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !215
parents 3fe08e0d f308fcfb
No related branches found
No related tags found
No related merge requests found
...@@ -167,12 +167,19 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, ...@@ -167,12 +167,19 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
/* Force color according to http://bixense.com/clicolors/ convention. */ /* Force color according to http://bixense.com/clicolors/ convention. */
{ {
const char* clicolor_force = getenv("CLICOLOR_FORCE"); const char* clicolor_force = getenv("CLICOLOR_FORCE");
if (clicolor_force && *clicolor_force && if (clicolor_force && strcmp(clicolor_force, "0") != 0) {
strcmp(clicolor_force, "0") != 0) {
return 1; return 1;
} }
} }
/* Disable color according to http://bixense.com/clicolors/ convention. */
{
const char* clicolor = getenv("CLICOLOR");
if (clicolor && strcmp(clicolor, "0") == 0) {
return 0;
}
}
/* GNU make 4.1+ may tell us that its output is destined for a TTY. */ /* GNU make 4.1+ may tell us that its output is destined for a TTY. */
{ {
const char* termout = getenv("MAKE_TERMOUT"); const char* termout = getenv("MAKE_TERMOUT");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment