Re: [PATCH] prompt, etc: trust when termcap says we have no colour

Oliver Kiddle <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
dana wrote:
> my proposal: if we have a good termcap entry, trust when it says there
> are no colours. also use this as a heuristic to decide whether it's ok
> to polyfill some capabilities like italics

I see the sense in not generating terminal colour sequences when termcap
reports no colours. Especially as we do likewise for bold etc. There may
have been good historic reasons not to do this:
  TERM=iris-ansi tput colors
  -1
That definitely did support colours. I think the entries sometimes cater
to older versions of a particular terminal emulator or new capabilities
don't get applied for older terminals.

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? I'm also fairly certain I've used a green on black physical
terminal in the distant past that did support italic. Admittedly it may have
used it as standout.

Oliver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.