From: Eric Sunshine <sunshine@sunshineco.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Eric Sunshine via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Jeff King <peff@peff.net>,
Taylor Blau <me@ttaylorr.com>,
"brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH v2 1/3] chainlint: sidestep impoverished macOS "terminfo"
Date: Fri, 11 Nov 2022 12:15:12 -0500 [thread overview]
Message-ID: <CAPig+cRCSg=iVLUmLG=W47ofojU56CcFsobNZK5z5h9LdzXs0Q@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cRwDeGyniiVGqmdMePgmR6GiYQOvNP+GUeT__zpuWV1Fg@mail.gmail.com>
On Fri, Nov 11, 2022 at 11:44 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Fri, Nov 11, 2022 at 10:02 AM Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
> > I also wonder to what extent this needs to be re-inventing
> > Term::ANSIColor, which has shipped with Perl since 5.6, so we can use it
> > without worrying about version compat, but that's another topic...
>
> Gah, why didn't I know about this sooner?! [...]
>
> Since it's been shipping with Perl for quite some time,
> Term::ANSIColor would be a much nicer solution; worth looking into.
In retrospect, I may have looked at Term::ANSIColor at the time but
decided to avoid it since it assumes the terminal understands ANSI
codes, and I was looking for a more general solution which respected
the terminal's capabilities as reported by "terminfo".
And, reading up on it now, I'm not finding much benefit to
Term::ANSIColor over what is already implemented in chainlint.pl.
Particularly disheartening is that (as far as I can tell)
Term::ANSIColor doesn't provide a way to interrogate whether or not it
is suitable to use ANSI codes with the terminal in question, but
instead makes a blanket assumption that the terminal supports ANSI
codes unconditionally.
So, I think the fixed-up colorizing as implemented by v2 of this patch
series is good enough for now. It can always be revisited later if
something warrants it.
next prev parent reply other threads:[~2022-11-11 17:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 16:58 [PATCH 0/3] chainlint: emit line numbers alongside test definitions Eric Sunshine via GitGitGadget
2022-11-09 16:58 ` [PATCH 1/3] chainlint: sidestep impoverished macOS "terminfo" Eric Sunshine via GitGitGadget
2022-11-09 22:18 ` Taylor Blau
2022-11-10 2:40 ` brian m. carlson
2022-11-10 3:37 ` Eric Sunshine
2022-11-10 22:21 ` brian m. carlson
2022-11-10 22:36 ` Eric Sunshine
2022-11-10 22:48 ` brian m. carlson
2022-11-09 16:58 ` [PATCH 2/3] chainlint: latch line numbers at which each token starts and ends Eric Sunshine via GitGitGadget
2022-11-09 16:58 ` [PATCH 3/3] chainlint: prefix annotated test definition with line numbers Eric Sunshine via GitGitGadget
2022-11-09 22:22 ` [PATCH 0/3] chainlint: emit line numbers alongside test definitions Taylor Blau
2022-11-11 7:34 ` [PATCH v2 " Eric Sunshine via GitGitGadget
2022-11-11 7:34 ` [PATCH v2 1/3] chainlint: sidestep impoverished macOS "terminfo" Eric Sunshine via GitGitGadget
2022-11-11 14:55 ` Ævar Arnfjörð Bjarmason
2022-11-11 16:44 ` Eric Sunshine
2022-11-11 17:15 ` Eric Sunshine [this message]
2022-11-11 21:56 ` Taylor Blau
2022-11-11 7:34 ` [PATCH v2 2/3] chainlint: latch line numbers at which each token starts and ends Eric Sunshine via GitGitGadget
2022-11-11 7:34 ` [PATCH v2 3/3] chainlint: prefix annotated test definition with line numbers Eric Sunshine via GitGitGadget
2022-11-11 15:03 ` [PATCH 0/3] chainlint: emit line numbers alongside test definitions Ævar Arnfjörð Bjarmason
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPig+cRCSg=iVLUmLG=W47ofojU56CcFsobNZK5z5h9LdzXs0Q@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
--cc=sandals@crustytoothpaste.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).