Skip to content

Commit 70d3ee5

Browse files
committed
Adopt the NO_COLOR standard
More here: http://no-color.org
1 parent 26ab3b0 commit 70d3ee5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

smenu.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5510,9 +5510,15 @@ main(int argc, char * argv[])
55105510

55115511
/* Get some terminal capabilities */
55125512
/* """""""""""""""""""""""""""""" */
5513-
term.colors = tigetnum("colors");
5514-
if (term.colors < 0)
5513+
5514+
if (getenv("NO_COLOR") != NULL)
55155515
term.colors = 0;
5516+
else
5517+
{
5518+
term.colors = tigetnum("colors");
5519+
if (term.colors < 0)
5520+
term.colors = 0;
5521+
}
55165522

55175523
/* Set the default timeout to 0: no expiration */
55185524
/* """"""""""""""""""""""""""""""""""""""""""" */

0 commit comments

Comments
 (0)