From owner-freebsd-arch@FreeBSD.ORG Sun Feb 23 11:59:52 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2C62D5A; Sun, 23 Feb 2014 11:59:52 +0000 (UTC) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) by mx1.freebsd.org (Postfix) with ESMTP id B8DA61577; Sun, 23 Feb 2014 11:59:52 +0000 (UTC) Received: from localhost.localdomain ([unknown] [71.178.10.220]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0N1G00I966NFCV60@vms173007.mailsrvcs.net>; Sun, 23 Feb 2014 05:59:44 -0600 (CST) Received: from localhost.localdomain (aerie [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id s1NBxd6E004390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 23 Feb 2014 06:59:39 -0500 Received: (from tom@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id s1NBxd9j004388; Sun, 23 Feb 2014 06:59:39 -0500 Date: Sun, 23 Feb 2014 06:59:39 -0500 From: Thomas Dickey To: Ed Schouten Subject: Re: terminfo Message-id: <20140223115939.GB4084@aerie.jexium-island.net> References: <5304A0CC.5000505@FreeBSD.org> MIME-version: 1.0 Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=DBIVS5p969aUjpLe Content-disposition: inline In-reply-to: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: arch@freebsd.org, Bryan Drewery X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: dickey@his.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 11:59:53 -0000 --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 21, 2014 at 01:05:52PM +0100, Ed Schouten wrote: > Hi Bryan, >=20 > On 19 February 2014 13:17, Bryan Drewery wrote: > > Why do we not use terminfo? Our termcap is quite aged and missing a lot > > of modern terminals/clients. >=20 > It is true that our termcap is quite aged, but the fact is, once you > add entries for a certain terminal, there's little need to update it > after that. ncurses itself is not really a moving target. What kind of > modern terminals/clients are missing? hmm - I continue to add/improve the database (and always have todo's) http://invisible-island.net/ncurses/terminfo.src-history.html > > Using terminfo would allow us to use the already well maintained databa= se from ncurses. Is it just a matter of someone doing the work or are there= other reasons? >=20 > It's just a matter of someone doing the work. It would be nice if we > ever made this change. It's more than that - there's some reluctance of the users to switch to terminfo. So what FreeBSD has is a facade wrapped around terminfo, with the legacy termcap database updated occasionally. =20 > I won't deny that termcap was really useful at one point in time, but > let's be honest: the variety of terminals out there has massively > dropped over time. Terminal emulation has become a solved problem. As > of FreeBSD 9, syscons supports all the sequences described in > xterm-256color, though it isn't able to print more than 8 colours, I'm inclined to disagree with that. Here's a working entry for the console, along with notes: http://invisible-island.net/ncurses/terminfo.src.html#tic-teken (though I see that I overlooked adding the note which I made for wsvt25, that none of the xterm-specific items is supported). Counting differences using infocmp: versus cons25 (37 lines) versus xterm-new (120 lines) One of the differences against cons25 is partial, as noted in my comments on acsc - there's no corresponding adjustment to make against xterm. > which is why we use TERM=3Dxterm. Tools like screen, tmux, etc., they > use a different TERM type, but this is mainly used to detect whether > the process is running inside of screen or tmux. It does not strongly > affect the kinds of sequences that are being emitted. They work > perfectly fine if you just set TERM to xterm or xterm-256color. >=20 > I suspect the following logic would be sufficient for at least 99.5% > of our users: >=20 > if $TERM contains 256 > use xterm-256color > else > use xterm I didn't see any 256-color support in testing this configuration. It does _something_, but would tend to disappoint users. ftp://invisible-island.net/temp/teken-88colors.png ftp://invisible-island.net/temp/teken-256colors.png (screenshots made using VMware Fusion with FreeBSD 10 - ymmv) =20 > It's a shame I am so short on time nowadays, but I think it would make > so much sense to just come up with some kind of document that > standardizes the intersection of the features supported by most common > terminal emulators and get it rubber stamped by the maintainers of > various terminal emulators. If it turns out some kind of terminal > emulator does something in a non-standard way, we can just slap this > document in the author's face. That would not only benefit FreeBSD, > but also most of the other flavours of UNIX. >=20 > $TERM should die. certainly not while there are such large differences among the implementati= ons. :-) --=20 Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net --DBIVS5p969aUjpLe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlMJ4qsACgkQcCNT4PfkjtuhgQCdFvrZJbPSj1B0oqTdtWb6RyXb kYEAniEYpH45cNdgLPQI3bB8RuvaNpXp =adgk -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe--