[Sorry, coming to this thread very late ...]
George Michaelson writes:
Terminfo just didn't feel very *relevant*
In the sense that we no longer stare down collections of Ann Arbor
Ambassador's with their endless combinations of screen configurations,
or just dealing with adm3a vs. xl83 vs. vtXX0, sure.
But terminfo (or cap) is still relevant to me every day in a couple
of ways, even though my $TERM is almost always 'xterm'.
Lots of terminals have internal memory buffers that curses can take
advantage of. The most common case is to have a cursor-oriented
application (vi, less, systat) grab on to one of those buffers and
use it while they run, and then restore the original terminal screen
when they exit. This preserves the shell session context around
the editor/whatever session. Sometimes this is useful. Sometimes
it is not.
I happen to dislike that behaviour. When I'm churning through a
sequence of commands and get to the point where I need to look up
something obscure in the manpage, there's nothing more frustrating
than running 'man foo', finding the section of the manpage that
describes exactly what I need to do, pressing 'q' to exit the pager,
and watching said pager erase the very information I was looking for
just to redraw the screen back to the point where I originally became
lost :-P
terminfo saves me[1] from that behaviour. The decision about how,
when, or if to use those memory buffers is part of the terminfo
definition for the $TERM I'm using. So I can customize the inter-
action between xterm and less by writing my own 'xterm' terminfo
definition that doesn't do the memory buffer dance. POSIX even
defines interfaces such as $TERMINFO and tic(1) that ensure I can
portably push my own 'xterm' definitions around to all the systems
I work on.
But of course, *everybody* knows the entire universe lives in an
ANSI terminal now, so why bother with curses?
This is the same logic that *knows* that nobody in the universe
customizes the colours they use in their terminal sessions, so
they can feel free to make up whatever colour mappings they want.
Don't like it? Then set our app-specific configuration settings,
or environment variables, or both. Because, why should we pay
attention to the terminal attribute mappings that have been in
terminfo/curses for how many decades?
--lyndon
[1] OpenBSD is very annoying about this. On every (every!) other
UNIX variant I use, I can upload and compile my custom
terminfo 'xterm' definition and It Just Works. Not OpenBSD ...