On 2020/12/30 22:05, Sabrina Velasquez wrote:
> Hello!
> I had an issue with ambiguous behavior of tput setaf in OpenBSD.
> If TERM=xterm, then tput setaf 1 works and changes foreground color to red,
> but it only supports 8 colors.
> If TERM=xterm-256color, then tput setaf 1 fails with error: 
> tput: not enough arguments (3) for capability `setaf'

I think this is a tput problem not an ncurses one. OpenBSD's tput is not
from ncurses, it validates the number of arguments separately and that
doesn't match what's actually needed by ncurses.

Workaround: use anything for the 2nd and 3rd parameters, both the
OpenBSD and ncurses tput commands ignore these. e.g. tput setaf 1 1 1.

This has been noted before:
https://marc.info/?l=openbsd-misc&m=144800414402238&w=2

> I've reached ncurses author and asked him about this issue.
> His answer was:
> "OpenBSD hasn't updated ncurses for the past 12 years"

That's not correct, it's only 11 years ;) (and it's not "pure" ncurses,
it has local changes).

Reply via email to