From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tom@tromey.com>, Andrew Burgess <aburgess@redhat.com>
Subject: Re: [PATCH] Support the NO_COLOR environment variable
Date: Tue, 19 Sep 2023 08:13:17 -0600 [thread overview]
Message-ID: <87a5ti8d4y.fsf@tromey.com> (raw)
In-Reply-To: <87h6nrztkl.fsf@redhat.com> (Andrew Burgess via Gdb-patches's message of "Mon, 18 Sep 2023 11:03:54 +0100")
>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
Andrew> Tom Tromey <tom@tromey.com> writes:
>> 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.
Andrew> I've never understood the passionate hatred some folk have for coloured
Andrew> output! But NO_COLOR sounds like a fairly reasonable request, so I'm in
Andrew> favour of adding this. I did have some thoughts on the testing...
Me neither but it seems pretty simple to accommodate them.
>> - if {$dumb_terminal} {
>> - clean_restart $binfile
>> - } else {
>> - Term::clean_restart 24 80 $binfile
>> - if {![Term::prepare_for_tui]} {
>> - unsupported "TUI not supported"
>> - return
>> + global env
>> + save_vars { env(TERM) } {
>> + setenv TERM $terminal
>> + if {$dumb_terminal} {
>> + clean_restart $binfile
>> + } else {
>> + Term::clean_restart 24 80 $binfile
>> + if {![Term::prepare_for_tui]} {
>> + unsupported "TUI not supported"
>> + return
>> + }
Andrew> I'm not sure that this change is needed.
Something is needed here, because without this there are regressions.
Tom
next prev parent reply other threads:[~2023-09-19 14:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-16 0:09 Tom Tromey
2023-09-16 5:34 ` Eli Zaretskii
2023-09-16 8:39 ` Matt Rice
2023-09-16 8:50 ` Eli Zaretskii
2023-09-19 14:11 ` Tom Tromey
2023-09-18 10:03 ` Andrew Burgess
2023-09-19 14:13 ` Tom Tromey [this message]
2023-09-26 13:48 ` Andrew Burgess
2024-01-04 0:38 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5ti8d4y.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).