mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Support NO_COLOR env variable as per no-color.org
This commit is contained in:
parent
d45c9b1a22
commit
02663f45ed
1 changed files with 5 additions and 0 deletions
|
|
@ -236,6 +236,11 @@ void options_parse(int argc, char *argv[])
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
// Support no-color.org informal spec
|
||||
char *no_color = getenv("NO_COLOR");
|
||||
if(no_color != NULL && no_color[0] != '\0')
|
||||
option.color = -1;
|
||||
|
||||
while (1)
|
||||
{
|
||||
static struct option long_options[] =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue