Re: [PATCH 1/3] chainlint: sidestep impoverished macOS "terminfo"
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 10, 2022, 22:36 UTC
- Message-ID
- <CAPig+cRcw8qxAMTZz-CpM23zPn+VpPJ7qQTtFrbMRmgbiyhymQ@mail.gmail.com>
- In-Reply-To
- <Y215ZKz2iZWJCYo3@tapette.crustytoothpaste.net>
On Thu, Nov 10, 2022 at 5:21 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 14 quoted lines
> 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.
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.