mirror of https://github.com/djcb/mu.git
mu: honor nocolor option
1. mu find hallo --> color 2. mu find hallo | less --> nocolor 3. NO_COLOR=yes mu find hallo --> nocolor Fixes #2369.
This commit is contained in:
parent
71162ee74f
commit
39a2c28777
|
@ -619,6 +619,7 @@ add_global_options(CLI::App& cli, Options& opts)
|
|||
!::isatty(::fileno(stdout)) ||
|
||||
!::isatty(::fileno(stderr)) ||
|
||||
::getenv("NO_COLOR") != NULL;
|
||||
opts.nocolor = default_no_color;
|
||||
|
||||
errno = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue