From owner-freebsd-arch@FreeBSD.ORG Thu Mar 6 01:24:11 2014 Return-Path: Delivered-To: freebsd-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 C611FCD6 for ; Thu, 6 Mar 2014 01:24:11 +0000 (UTC) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A61BA8BE for ; Thu, 6 Mar 2014 01:24:11 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WLN2g-0007bn-Hn for freebsd-arch@freebsd.org; Wed, 05 Mar 2014 17:24:10 -0800 Date: Wed, 5 Mar 2014 17:24:10 -0800 (PST) From: "Paul \"LeoNerd\" Evans" To: freebsd-arch@freebsd.org Message-ID: <1394069050543-5892023.post@n5.nabble.com> In-Reply-To: <20140227230528.GB8295@stack.nl> References: <5304A0CC.5000505@FreeBSD.org> <20140223115939.GB4084@aerie.jexium-island.net> <20140226085939.GC2705@server.rulingia.com> <20140227230528.GB8295@stack.nl> Subject: Re: terminfo MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2014 01:24:11 -0000 Jilles Tjoelker wrote > I think it is worth it to simplify terminals. Instead of having people > choose how they want their terminal to work improperly, provide one way > and concentrate on making that work as well as possible (no visual > artifacts, 256 colours, Unicode, key combinations like Ctrl+Home, etc.) I agree here too. I'm sure overall, application writers waste more time trying to accommodate every possible variation in terminals, than terminal authors would just getting to a place where they all agree. I for one have wasted far too long getting my libraries to properly understand that bce is default-off in screen, and how to work around it. Lets not forget; the original reason we're in this state has to do with DEC vs Wyse vs IBM vs everyone else, trying to build glass teletypes. We're past that age now. Jilles Tjoelker wrote > I also like the idea of some applications sending control sequences > directly, without using curses or even termcap/terminfo. libtickit does exactly this. If $TERM implies a recent enough terminal (i.e. TERM=xterm or variations) then it switches to an active probing mode where it just asks the terminal whether it supports 256 colours, and so on. It then uses an entirely built-in set of sequences, not looked up from termcap/terminfo. In fact, more or less the only reason libtickit links against unibilium or tinfo of ncurses is so that it can look up the afore-mentioned bce flag, in order to work out if it should print spaces or use ECH. I've always felt this a far better way to write terminal applications. Which of these is the best way to know if a terminal supports a given feature: a) use a possibly-wrong local environment variable as a key into a disk database on the local machine (where the terminal may not be running; e.g. consider ssh) to find a fixed set of capabilities that were current about the terminal when those files were written, or b) ask it I vote "b" :) For anyone who still thinks "a" I will leave you to consider how your termcap file knows whether I compiled my terminal using ./configure --with-256colours --with-italics --without-underline -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk http://www.leonerd.org.uk/ -- View this message in context: http://freebsd.1045724.n5.nabble.com/terminfo-tp5887280p5892023.html Sent from the freebsd-arch mailing list archive at Nabble.com.