git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] chainlint: sidestep impoverished macOS "terminfo"

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Nov 10, 2022, 22:21 UTC
Message-ID
<Y215ZKz2iZWJCYo3@tapette.crustytoothpaste.net>
In-Reply-To
<CAPig+cTL4x45E2a0RbpO2ntPo08K8hQ2wxcXm=QesqtYqxpvaw@mail.gmail.com>
On 2022-11-10 at 03:37:16, Eric Sunshine wrote:
> Hmm, on my machine "nsterm" also lacks the "dim" capability. I see
> that Neovim docs recommend "nsterm" with Terminal.app, so perhaps that
> ought to be handled specially here, as well. Do you think any
> variations other than base "nsterm" are worth special-casing?
I'd say we should do nsterm, nsterm-256color, and nsterm-direct.
Show 6 quoted lines
> I don't mind tightening which terminal types are handled specially.
> "xterm-direct" doesn't exist on my old macOS. Is it present on newer
> macOS? If so, does it require special-casing (i.e. does it lack
> "dim")? If we don't special-case "xterm-direct", it will fall back to
> using `tput` interrogation, which should be fine as long as the
> "xterm-direct" terminfo entry is accurate.

It's present in newer ncurses, so I expect it will make its way to macOS eventually. I don't know whether Apple's version of it will contain the `dim` capability, but on Debian all three xterm variants do.

It sounds like Apple is specifically limiting their capabilities for some reason when upstream ncurses doesn't. I can't say why that is, but perhaps it's for compatibility. Debian had to do that for one release with screen* when Screen added support for some new feature but tmux had not.

Show 7 quoted lines
> 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.
Show 5 quoted lines
> Of course, the other option is to follow Git's own lead by not
> worrying about TERM and `tput` and just assume everyone understands
> ANSI color codes. I'm too old-school to feel entirely comfortable with
> that approach, but I would entertain it if others feel it is safe
> enough.
Sure.  I would also prefer to avoid that.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Eric SunshineNext: Eric Sunshine
Message 6 of 20 in “chainlint: emit line numbers alongside test definitions”
  1. 0/3 chainlint: emit line numbers alongside test definitionsEric Sunshine via GitGitGadget, Nov 9, 2022
  2. 1/3 chainlint: sidestep impoverished macOS "terminfo"Eric Sunshine via GitGitGadget, Nov 9, 2022
  3. Taylor BlauNov 9, 2022
  4. brian m. carlsonNov 10, 2022
  5. Eric SunshineNov 10, 2022
  6. brian m. carlsonNov 10, 2022
  7. Eric SunshineNov 10, 2022
  8. brian m. carlsonNov 10, 2022
  9. 2/3 chainlint: latch line numbers at which each token starts and endsEric Sunshine via GitGitGadget, Nov 9, 2022
  10. 3/3 chainlint: prefix annotated test definition with line numbersEric Sunshine via GitGitGadget, Nov 9, 2022
  11. Taylor BlauNov 9, 2022
  12. 0/3 chainlint: emit line numbers alongside test definitionsEric Sunshine via GitGitGadget, Nov 11, 2022
  13. 1/3 chainlint: sidestep impoverished macOS "terminfo"Eric Sunshine via GitGitGadget, Nov 11, 2022
  14. Ævar Arnfjörð BjarmasonNov 11, 2022
  15. Eric SunshineNov 11, 2022
  16. Eric SunshineNov 11, 2022
  17. Taylor BlauNov 11, 2022
  18. 2/3 chainlint: latch line numbers at which each token starts and endsEric Sunshine via GitGitGadget, Nov 11, 2022
  19. 3/3 chainlint: prefix annotated test definition with line numbersEric Sunshine via GitGitGadget, Nov 11, 2022
  20. Ævar Arnfjörð BjarmasonNov 11, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.