We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4571a5 commit c43753cCopy full SHA for c43753c
src/misc.c
@@ -2154,7 +2154,12 @@ int terminal_supports_color(void)
2154
#ifndef _WIN32
2155
char *s;
2156
2157
- /* Yeah we check all of stdin, stdout, stderr, because
+ /* Support NO_COLOR as per https://no-color.org */
2158
+ s = getenv("NO_COLOR");
2159
+ if (s != NULL && s[0] != '\0')
2160
+ return 0;
2161
+
2162
+ /* Yeah we check all of stdin, stdout, stderr, because one
2163
* or more may be redirected (bin/unrealircd >log 2>&1),
2164
* and then we want to say no to color support.
2165
*/
0 commit comments