[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: infocmp posible bug
From: |
Peter Radisson |
Subject: |
Re: infocmp posible bug |
Date: |
Sat, 11 Jan 2025 13:17:26 +0100 |
User-agent: |
Mozilla Thunderbird |
Hi,
thx for the quick answer.
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.
note: i was ask a curses because i was ask how dolphie manage to make
such a display (i did not know anything about dophie before).
https://github.com/charles-001/dolphie
So i started to play with curses again after several years ...
i guess you care about curses application so this maybe of interesst for
you: https://terminaltrove.com/categories/tui/
Am 11.01.25 um 00:45 schrieb Thomas Dickey:
On Fri, Jan 10, 2025 at 11:17:13PM +0100, Peter Radisson wrote:
Hi,
i was playing with infocmp to learn about long and short names so i can
use tput better.
I am using the current version with opensuse
infocmp -V
ncurses 6.1.20180317
when i was dumping the xterm capabilities i noted that the long name
version has one entry that the short version is missing. So far i
understand is there for any long name also a short name, so this may
indicate an error.
not quite - there are some exceptions. I can see offhand the use of
"user-defined" capabilities in the output (see screenshot in vi-like-emacs).
The short name for backspaces_with_bs is OTbs, for which the explanation
is ESR's comment at the top of terminfo.src:
# The version you are looking at may be in any of three formats: master
# (terminfo with OT capabilities), stock terminfo, or termcap. You can
tell
# which by the format given in the header above.
#
# The master format is accepted and generated by the terminfo tools in
the
# ncurses suite; it differs from stock (System V-compatible) terminfo
only
# in that it admits a group of capabilities (prefixed `OT') equivalent
to
# various obsolete termcap capabilities. You can, thus, convert from
master
# to stock terminfo simply by filtering with `sed "/OT[^,]*,/s///"';
but if
# you have ncurses `tic -I' is nicer (among other things, it
automatically
# outputs entries in a canonical form).
The names are defined in include/Caps:
https://github.com/ThomasDickey/ncurses-snapshots/blob/c6d02b91c12b8d9dfc53a04119ad094543742ec1/include/Caps#L843
# The capabilities below are either obsolete or extensions on certain
systems.
# They are not used by SVR4 terminfo. Some are used by captoinfo to
translate
# termcap sources; the rest are listed for completeness, and in case
somebody
# cares about them enough to hack in code that will translate them into
# terminfo capabilities.
It's not in the manpage, because few people are interested in a manual
page devoted to obsolete features that aren't used in ncurses aside from
recognizing them.
documentation is a PIA, i wrote several man pages myself. I would
encourage you to publish the list of long names vs short names at least.
Bonus points when you add the arguments.
To make that more accessable for programms maybe it is a good idea to
have a data base in the background. As mentioned i started with tput and
was in the beginning fustrated with the lack of documentation how to
access the code of the screens (lateri found an old post mentioning
infocmp, btw the tput man page lacks a hint to "infocmp" in the see also
section).
ESR had three files, intending to mechanically translate between the
three. That was incomplete, resulting in errors. I repaired things
over the course of several years, while improving tic/infocmp to
mechanically translate termcap.src from terminfo.src
I had no use for a separate "master" file, because it was usable as
terminfo with the "OT" names as specially-handled "user-defined" (or
"extended") capabilities. But the BSDs have had a use for the
termcap.src file (mainly NetBSD and OpenBSD -- FreeBSD's file has its
own history and quirks):
https://invisible-island.net/ncurses/tctest.html
Besides the additional consistency checks I added to tic, I occasionally
check old entries against the SCO terminal database from which ESR
copied extensively, as well as Solaris and other vendor databases. For
anything newer than 25 years or so, I'm on my own.
I use a script combining tic/infocmp to preview differences between a
working terminfo.src and what's installed. That currently produces a
list of 2860 lines, one for each terminal description. Running it on
the "termtypes.master" file gives a listing of the differences - 15487
lines.
Even with all of that, occasionally someone reports an error.
But this instance isn't one of those.
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.
CU
Re: infocmp posible bug, Thomas Dickey, 2025/01/10