From owner-freebsd-questions@freebsd.org Wed Jan 6 18:38:58 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56D9FA65B74 for ; Wed, 6 Jan 2016 18:38:58 +0000 (UTC) (envelope-from sgniazdowski@gmail.com) Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com [IPv6:2a00:1450:4010:c04::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCD0D1AB7 for ; Wed, 6 Jan 2016 18:38:57 +0000 (UTC) (envelope-from sgniazdowski@gmail.com) Received: by mail-lb0-x230.google.com with SMTP id bc4so195038884lbc.2 for ; Wed, 06 Jan 2016 10:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=xjlfwrpREQ577lfxLDIve2UoB+6stvdzf/y5EllVO0k=; b=w1OADxxk9xoggAtmznlM2n7FqbvNx3+nb3ch4DIBJQCLCPx3QhAiLzrFVHnDpyM29s OWm8ibCbcqfTDleYtoFs1zJ8blAXXwo2O0hXQFYlhTL/SsTpVdKt6HV4ws94ZOV7zbxl 324xSsWE/mUjJyCLnzIm95KPsAQnHBkIflSNFjgmOlgdFxRzULmRK72lYQ+5OF/JQh1A ItJcz5A/kp7zQBsObu6LY3bjzxOGUtcEMS4jZdmJOCEPcmtn+rXRfnHiToW0nOYjIdJx 861unMNO1Z3ridFy/8M3ecqe7leT1WL+HAnUDPzx2D3T2jP1BSh6wycvOnXqbbh8S9jL ArAg== X-Received: by 10.112.64.5 with SMTP id k5mr17982455lbs.133.1452105534649; Wed, 06 Jan 2016 10:38:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.62.111 with HTTP; Wed, 6 Jan 2016 10:38:35 -0800 (PST) From: Sebastian Gniazdowski Date: Wed, 6 Jan 2016 19:38:35 +0100 Message-ID: Subject: TERM=xterm lacking smcup and rmcup (alternate screen) To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 18:38:58 -0000 Hello I want to criticize an approach taken in FreeBSD regarding the alternate screen. It's not available in newcons. One person wrote that's because Tekken doesn't have such feature, and newcons implements Tekken. That's maybe fine. However, newcons doesn't have it's own termcap. It uses TERM=xterm, which normally has rmcup and smcup. Some smart person thus decided to remove those codes from TERM=xterm. You see what this leads to? No alternate screen on X11. Why doesn't newcon create it's own termcap entry? Why nobody cares about trashed xterm screens when fullscreen applications are exiting. In my software I've wrote a special function to handle FreeBSD nuance: https://github.com/psprint/zsh-cmd-architect/blob/master/zca#L65-L81 But this should be fixed, really. Newcons could ignore rmcup and smcup. Why remove them from TERM=xterm, let newcons just ignore it. FreeBSD could then still use TERM=xterm for its virtual terminal. Best regards, Sebastian Gniazdowski