public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Matt Rice <ratmice@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Support the NO_COLOR environment variable
Date: Sat, 16 Sep 2023 08:39:34 +0000	[thread overview]
Message-ID: <CACTLOFq2BBJkV2uj2=EtpDMY6zRLcW2jfVc22G+9LTJihBQY2A@mail.gmail.com> (raw)
In-Reply-To: <83bke2k7fa.fsf@gnu.org>

On Sat, Sep 16, 2023 at 5:35 AM Eli Zaretskii via Gdb-patches
<gdb-patches@sourceware.org> wrote:
>
> > From: Tom Tromey <tom@tromey.com>
> > Cc: Tom Tromey <tom@tromey.com>
> > Date: Fri, 15 Sep 2023 18:09:08 -0600
> > 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.
>
> Should we also support the --color command-line argument, e.g. to
> countermand NO_COLOR in the environment, and also as an alternative to
> the environment variable?
>

I'm not sure a specific --color command-line argument is necessary,
the arg --early-init-eval-command 'set style enabled' (-eiex, which I
noticed is missing from --help.) works even when NO_COLOR is set,
appropriately printing colors in the non-quiet startup message.  So
even without something specific like --color it is possible to
override the env var.  IMO the need for specific commands for things
we want to happen early like `--quiet` vs `-eiex 'set
startup-quietly'` feel to me like holdovers from before
early evaluation existed when a specific command line arg like
`--quiet` needed early evaluation to have any effect.  But perhaps
that is just an opinion.

  reply	other threads:[~2023-09-16  8:39 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 [this message]
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
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='CACTLOFq2BBJkV2uj2=EtpDMY6zRLcW2jfVc22G+9LTJihBQY2A@mail.gmail.com' \
    --to=ratmice@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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).