Merge pull request #1368 from oleskiewicz/master
mu-config: add NO_COLOR environment variable
This commit is contained in:
@ -22,8 +22,9 @@ commands, but you won't be able to index/search your mail.
|
|||||||
|
|
||||||
By default, \fBmu\fR uses colorized output when it thinks your
|
By default, \fBmu\fR uses colorized output when it thinks your
|
||||||
terminal is capable of doing so. If you don't like color, you can use
|
terminal is capable of doing so. If you don't like color, you can use
|
||||||
the \fB--nocolor\fR command-line option, or set the \fBMU_NOCOLOR\fR
|
the \fB--nocolor\fR command-line option, or set either the
|
||||||
environment variable to non-empty.
|
\fBMU_NOCOLOR\fR or the \fBNO_COLOR\fR environment variable to
|
||||||
|
non-empty.
|
||||||
|
|
||||||
.SH INDEXING YOUR E-MAIL
|
.SH INDEXING YOUR E-MAIL
|
||||||
|
|
||||||
|
|||||||
@ -79,9 +79,9 @@ set_group_mu_defaults (void)
|
|||||||
MU_CONFIG.muhome = exp;
|
MU_CONFIG.muhome = exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for the MU_NOCOLOR env var; but in any case don't
|
/* check for the MU_NOCOLOR or NO_COLOR env vars; but in any case don't
|
||||||
* use colors unless we're writing to a tty */
|
* use colors unless we're writing to a tty */
|
||||||
if (g_getenv (MU_NOCOLOR) != NULL)
|
if (g_getenv (MU_NOCOLOR) != NULL || g_getenv ("NO_COLOR") != NULL)
|
||||||
MU_CONFIG.nocolor = TRUE;
|
MU_CONFIG.nocolor = TRUE;
|
||||||
|
|
||||||
if (!isatty(fileno(stdout)) || !isatty(fileno(stderr)))
|
if (!isatty(fileno(stdout)) || !isatty(fileno(stderr)))
|
||||||
|
|||||||
Reference in New Issue
Block a user