On Thu, Nov 10, 2022 at 5:21 PM brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx> 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. 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.