From 05dcacd94acb0695c68492b01051b310e5257a37 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 16 May 2023 20:03:11 -0400 Subject: Respect $NO_COLOR --- bp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bp.c b/bp.c index bd33e99..6adad36 100644 --- a/bp.c +++ b/bp.c @@ -647,7 +647,7 @@ int main(int argc, char *argv[]) if (options.context_after == USE_DEFAULT_CONTEXT) options.context_after = 0; if (options.format == FORMAT_AUTO) - options.format = isatty(STDOUT_FILENO) ? FORMAT_FANCY : FORMAT_BARE; + options.format = isatty(STDOUT_FILENO) ? (getenv("NO_COLOR") ? FORMAT_PLAIN : FORMAT_FANCY) : FORMAT_BARE; // If any of these signals triggers, and there is a temporary file in use, // be sure to clean it up before exiting. -- cgit v1.2.3