Support the NO_COLOR environment variable
authorTom Tromey <tom@tromey.com>
Fri, 15 Sep 2023 23:24:26 +0000 (17:24 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 29 Sep 2023 16:55:43 +0000 (10:55 -0600)
commit4ebfd53de03599b73838ee339e47652ac26c37c0
tree5990de5f860d32aa252dfb7564fbbb56179f737c
parent2677a57064afd32076b85295bdc11de6e75e7e36
Support the NO_COLOR environment variable

I ran across this site:

    https://no-color.org/

... which lobbies for tools to recognize the NO_COLOR environment
variable and disable any terminal styling when it is seen.

This patch implements this for gdb.

Regression tested on x86-64 Fedora 38.

Co-Authored-By: Andrew Burgess <aburgess@redhat.com>
Reviewed-by: Kevin Buettner <kevinb@redhat.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
17 files changed:
gdb/NEWS
gdb/doc/gdb.texinfo
gdb/main.c
gdb/testsuite/gdb.base/early-init-file.exp
gdb/testsuite/gdb.base/readline-ask.exp
gdb/testsuite/gdb.base/style-interp-exec-mi.exp
gdb/testsuite/gdb.base/style-logging.exp
gdb/testsuite/gdb.base/style.exp
gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
gdb/testsuite/gdb.python/py-format-string.exp
gdb/testsuite/gdb.python/py-source-styling.exp
gdb/testsuite/gdb.python/py-startup-opt.exp
gdb/testsuite/gdb.rust/rust-style.exp
gdb/testsuite/gdb.tui/tui-layout.exp
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/tuiterm.exp