Skip to content

Commit f054357

Browse files
committed
Implement explicit NO_COLOR env support
Further options to achieve the same: - Use --no-color command line argument (since 2010-02-25, 62a3167) - Select "Monochrome" color scheme from Setup screen (f5f29ce)
1 parent 2b3b151 commit f054357

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

CommandLine.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ static CommandLineStatus parseArguments(int argc, char** argv, CommandLineSettin
119119
.hideFunctionBar = false,
120120
};
121121

122+
{
123+
const char* no_color = getenv("NO_COLOR");
124+
if (no_color && no_color[0] != '\0')
125+
flags->useColors = false;
126+
}
127+
122128
const struct option long_opts[] =
123129
{
124130
{"help", no_argument, 0, 'h'},

0 commit comments

Comments
 (0)