diff options
author | Brad King <brad.king@kitware.com> | 2015-10-20 15:16:38 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-20 15:16:38 (GMT) |
commit | fca389e78ca8d5fe377a4116dedf8b9307126380 (patch) | |
tree | c5133a9f058502652a0df057b0f25e20c9b4683f | |
parent | 693141c40e87a77f0a0258e21235197d421c26a5 (diff) | |
parent | c6d75294b2827a7f24baed4814046d9d0bd6a61d (diff) | |
download | CMake-fca389e78ca8d5fe377a4116dedf8b9307126380.zip CMake-fca389e78ca8d5fe377a4116dedf8b9307126380.tar.gz CMake-fca389e78ca8d5fe377a4116dedf8b9307126380.tar.bz2 |
Merge topic 'update-kwsys'
c6d75294 Merge branch 'upstream-kwsys' into update-kwsys
9c6a7203 KWSys 2015-10-16 (a7e5360f)
-rw-r--r-- | Source/kwsys/Terminal.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c index d13f79a..a8abb6c 100644 --- a/Source/kwsys/Terminal.c +++ b/Source/kwsys/Terminal.c @@ -184,14 +184,25 @@ static const char* kwsysTerminalVT100Names[] = static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, int default_tty) { + /* Force color according to http://bixense.com/clicolors/ convention. */ + { + const char* clicolor_force = getenv("CLICOLOR_FORCE"); + if (clicolor_force && *clicolor_force && strcmp(clicolor_force, "0") != 0) + { + return 1; + } + } + /* If running inside emacs the terminal is not VT100. Some emacs seem to claim the TERM is xterm even though they do not support VT100 escapes. */ + { const char* emacs = getenv("EMACS"); if(emacs && *emacs == 't') { return 0; } + } /* Check for a valid terminal. */ if(!default_vt100) |