mirror of
https://github.com/git/git.git
synced 2026-02-11 10:18:04 +00:00
Enable color output in Windows cmd.exe
Git requires the TERM environment variable to be set for all color* settings. Simulate the TERM variable if it is not set (default on Windows). Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Pat Thoyts
parent
93d9b2ca1b
commit
d64a31c018
@@ -1264,6 +1264,10 @@ char *mingw_getenv(const char *name)
|
||||
if (!result)
|
||||
result = getenv_cs("TEMP");
|
||||
}
|
||||
else if (!result && !strcmp(name, "TERM")) {
|
||||
/* simulate TERM to enable auto-color (see color.c) */
|
||||
result = "winansi";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user