bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: infocmp posible bug


From: Thomas Dickey
Subject: Re: infocmp posible bug
Date: Sat, 11 Jan 2025 17:25:59 -0500

On Sat, Jan 11, 2025 at 12:21:38PM -0600, G. Branden Robinson wrote:
> Hi Peter,
> 
> At 2025-01-11T13:17:26+0100, Peter Radisson wrote:
> > i was a bit fustrated by the lack of documentation regarding the
> > possibilites of tput (or the terminals). When you google that topic
> > only a few caps regarding colors are discussed, most times people are
> > unaware of the other features.

google isn't very efficient for commonly used terms such as "color".

The terminfo manpage has a section on "Color Handling".

The see-also for tput does point there:

SEE ALSO
       clear(1), stty(1), tabs(1), tset(1), termcap(3NCURSES), terminfo(5).

But of course manpages aren't tutorials.  (On the other hand, existing
tutorials leave a lot to be desired...)

> The ncurses man pages have been undergoing fairly extensive revision for
> the past year or so.  Have you consulted a contemporary version of the
> tput(1) man page, say from ncurses 6.5, rather than that from 6.1, which
> is about 7 years old?
> 
> Here is how the "DESCRIPTION" section of the tput(1) man page begins
> nowadays.
> 
> DESCRIPTION
>      tput uses the terminfo library and database to make terminal‐
>      specific capabilities and information available to the shell, to
>      initialize or reset the terminal, or to report a description of the
>      current (or specified) terminal type.  Terminal capabilities are
>      accessed by cap‐code.
> 
>      terminfo(5) discusses terminal capabilities at length and presents
>      a complete list of cap‐codes.
> 
> That last quoted sentence in its own paragraph would appear to address
> your complaint.

If not, perhaps another paragraph explaining how infocmp can show what
capabilities tput will respond to could be helpful.

But documenting the OTxxx stuff in the manpage - probably not.

If any of that had been used by anyone, there'd have been some
suggestion made to rename the variables.

If you look in the mail archives, the previous mention of OTbs
is basically just because it was a line or so away from some
feature in a copy/paste of a terminal description.

fwiw, that stuff has been in the terminfo.src file since late 1999:

REV:1.142               terminfo.src         1999/12/05 01:28:27       tom
tags:            v5_0_19991204

   added the extra data from Eric's "master format" file, which is essentially
   just the pieces of termcap information that do not map 1-1 into terminfo.
   I coordinated this change with the -x option in tic so I can run 
test-terminfo
   for comparison.
 
> > no need to see this as a bug. But it should become a rule to a have a
> > short and corresponding long name. Otherwise it is confusing.

extended capabilities have only the short name, because that uses just
the syntax of the terminal description:  providing for a single name. 
That allows one to use the ncurses terminfo source file with other
implementations (with perhaps a warning but no error).

If there were some way to specify long names, that would make the
terminfo source file incompatible with other implementations, because it
couldn't be done without adding new (i.e., incompatible) syntax.

The OTxxx stuff was a special case, because ESR had partially-documented
it in terminfo.src and Caps, so I provided for using the long name from
Caps.

By the way, "termcap" names are exactly two characters.  If some termcap
user were using the generated termcap file, that "bs" would be available
for that purpose:

xterm-new|modern xterm terminal emulator:\
        :5i:NP:am:bs:es:hs:km:mi:ms:ut:xn:AX:XF:XT:\
                  ^^

but in terminfo, it's just a placeholder, which can be ignored.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]