From owner-freebsd-questions@FreeBSD.ORG Wed Aug 13 18:29:16 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 906D3106567D for ; Wed, 13 Aug 2008 18:29:16 +0000 (UTC) (envelope-from raghu@mri.ernet.in) Received: from hrimail.hri.res.in (hrimail.hri.res.in [210.212.50.7]) by mx1.freebsd.org (Postfix) with ESMTP id B384E8FC0C for ; Wed, 13 Aug 2008 18:29:15 +0000 (UTC) (envelope-from raghu@mri.ernet.in) Received: from ipc2.mri.ernet.in (unknown [192.168.3.2]) by hrimail.hri.res.in (Postfix) with ESMTP id B52F697EAE; Thu, 14 Aug 2008 00:06:53 +0530 (IST) Received: from ipc2 (localhost [127.0.0.1]) by ipc2 (Postfix) with SMTP id 1541023223; Wed, 13 Aug 2008 23:59:04 +0530 (IST) Received: from riemann.mri.ernet.in (riemann.mri.ernet.in [192.168.3.122]) by ipc2.mri.ernet.in (Postfix) with ESMTP id D8ED11D51B; Wed, 13 Aug 2008 23:59:03 +0530 (IST) Received: from riemann.mri.ernet.in (localhost [127.0.0.1]) by riemann.mri.ernet.in (8.13.6/8.13.6) with ESMTP id m7DIMcrT076244; Wed, 13 Aug 2008 23:52:38 +0530 (IST) (envelope-from raghu@riemann.mri.ernet.in) Received: (from raghu@localhost) by riemann.mri.ernet.in (8.13.6/8.13.6/Submit) id m7DIMZq5076243; Wed, 13 Aug 2008 23:52:35 +0530 (IST) (envelope-from raghu) From: "N. Raghavendra" To: "Krishna Mohan Gundu" In-Reply-To: <70ec82800808121707p3fc0567bgf610360bd2f2a2f0@mail.gmail.com> (Krishna Mohan Gundu's message of "Tue, 12 Aug 2008 17:07:08 -0700") References: <70ec82800808121707p3fc0567bgf610360bd2f2a2f0@mail.gmail.com> X-Organization: Harish-Chandra Research Institute (HRI) X-Address: Chhatnag Road, Jhusi, Allahabad 211 019, India X-URL: http://www.mri.ernet.in/ and http://www.retrotexts.net/ X-Phone: +91 (532) 2667 509, 2667 318, 2667 578, 2567 746, 2567 747 X-Fax: +91 (532) 2667 576, 2567 748, 2567 444, 2568 036 X-OpenPGP-Key-ID: 0x03618806 X-OpenPGP-Key-Fingerprint: C75D D0AF 457E 7454 BEC2 37AD C6E1 0407 0361 8806 X-OpenPGP-Public-Key-Available-At: http://www.keyserver.net/ Date: Wed, 13 Aug 2008 23:52:35 +0530 Message-ID: <86myjg4vx0.fsf@riemann.mri.ernet.in> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: stopping less command from garbaging on the screen X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "N. Raghavendra" List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2008 18:29:16 -0000 At 2008-08-12T17:07:08-07:00, Krishna Mohan Gundu wrote: > When less exits the entire page history of the less session remains > on the screen. How do I prevent less from doing that? A brute-force method is to repaint the screen before `less', and to clear it afterwards, which can be done in `tcsh' with alias less 'less -c \!* && clear' However, this makes the screen contents prior to the `less' command scroll off the top and become invisible. To avoid this, you can use termcap(5) instead of the above alias: setenv TERMCAP "xterm|xterm-color:tc=xterm-xfree86:" setenv LESS "-cs" setenv PAGER "less" See http://www.greenwoodsoftware.com/less/faq.html#tite and `/etc/termcap'. > Also are you aware of any articles on the web that summarize the > behavioral differences like these between linux and freebsd. I used Debian for several years before moving to FreeBSD some years ago. I don't remember particularly making an effort to deal with the differences between them, so I can't help you there. FWIW, I found Matthew Fuller's article `BSD vs Linux' at http://www.over-yonder.net/~fullermd/rants/bsd4linux/bsd4linux1.php interesting. Raghavendra. -- N. Raghavendra | http://www.retrotexts.net/ Harish-Chandra Research Institute | http://www.mri.ernet.in/ See message headers for contact and OpenPGP information.