Re: [PATCH 1/3] chainlint: sidestep impoverished macOS "terminfo"
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Nov 10, 2022, 22:48 UTC
- Message-ID
- <Y21/0Kxd2gY2eMBE@tapette.crustytoothpaste.net>
- In-Reply-To
- <CAPig+cRcw8qxAMTZz-CpM23zPn+VpPJ7qQTtFrbMRmgbiyhymQ@mail.gmail.com>
On 2022-11-10 at 22:36:14, Eric Sunshine wrote:
Show 19 quoted lines
> On Thu, Nov 10, 2022 at 5:21 PM brian m. carlson > <sandals@crustytoothpaste.net> wrote: > > On 2022-11-10 at 03:37:16, Eric Sunshine wrote: > > > I notice that the iTerm2 FAQ also recommends "xterm-new" on macOS, and > > > that one lacks "dim", as well on my machine. So, it seems that it > > > should be special-cased too. > > > > > > Taking all the above into account, perhaps this regex? > > > > > > /xterm|xterm-.*color|xterm-new|nsterm/ > > > > Maybe this, then? > > > > /(xterm|nsterm)(-(256color|direct))?|xterm-new/ > > > > That matches the three special variants of each one here plus xterm-new. > > I was thinking of targeting xterm-16color too, not just > xterm-256color, just to cover bases a bit better.
Sure, that seems like a good idea. I know that was popular for a time, although I feel like it's maybe less popular today with more colour options.
Show 6 quoted lines
> I also don't mind manually spelling out the regex: > > /xterm|xterm-\d+color|xterm-new|xterm-direct|nsterm|nsterm-\d+color|nsterm-direct/ > > for simplicity's sake; sure it's verbose, but it's also dead-easy for > people to understand and extend in the future if necessary.
Simplicity is nice. I think that seems like a good pattern.
-- brian m. carlson (he/him or they/them) Toronto, Ontario, CA