From 39a2c2877788842c8267956acf3ea866293d9e70 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 24 Nov 2022 18:43:05 +0200 Subject: [PATCH] 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. --- mu/mu-options.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/mu/mu-options.cc b/mu/mu-options.cc index e0dc5098..c02fc83a 100644 --- a/mu/mu-options.cc +++ b/mu/mu-options.cc @@ -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;