Re: [PATCH] prompt, etc: trust when termcap says we have no colour
dana <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed 22 Apr 2026, at 20:06, Oliver Kiddle wrote: > However, I don't follow the logic behind using this as a heuristic for > italic and faint. Heuristics should at least be based on some lived > examples. And `TERM=dumb tput sitm` produces nothing so what problem are > you solving? well, it wouldn't, because tput doesn't fall back to a hard-coded \e[3m when it's not in the db like zsh does the problem i was trying to solve, or at least minimise, is that we may emit sequences for italics on terminals that don't support them maybe the most likely example of this is the linux console (TERM=linux) -- if i set zle_highlight=( default:italic ) there, all my inputs are green as far as the heuristic, i just figured 'has colours' would be a high enough bar that it'll avoid that issue for more limited terminals without leaving us without the polyfills for... whichever terminals you added those for (?) unfortunately it won't do anything for TERM=linux specifically. but since we've already decided to not trust what termcap says about this capability idk what would be a more reliable method. do you? ps: TERM=dumb is actually not affected by this issue because it has TERM_NOUP, which makes tsetcap() a no-op. TERM=sun and TERM=vt100 are examples of ones that are, and are 'fixed' by my heuristic dana