Date: Thu, 19 Feb 2015 20:41:17 -0800 From: Kevin Oberman <rkoberman@gmail.com> To: Warren Block <wblock@wonkity.com> Cc: Davide Italiano <davide@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>, Xin LI <d@delphij.net> Subject: Re: default pager (csh) Message-ID: <CAN6yY1uO0WrxpcEtPO9AXUNBsfmhnSrwxKX7KrLgH5aCJNpSRQ@mail.gmail.com> In-Reply-To: <CAN6yY1udfAudVeM1KJapTLhnHZwiNtHhTxmk9%2BOh0Xuid6t7-Q@mail.gmail.com> References: <CACYV=-GBD5FmnsQr=KC6Wc9qZ9UAFPQgPmNyS5Jr6Vs2G7dGjA@mail.gmail.com> <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> <alpine.BSF.2.11.1502191806400.40355@wonkity.com> <CAN6yY1udfAudVeM1KJapTLhnHZwiNtHhTxmk9%2BOh0Xuid6t7-Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 19, 2015 at 7:45 PM, Kevin Oberman <rkoberman@gmail.com> wrote: > On Thu, Feb 19, 2015 at 5:10 PM, Warren Block <wblock@wonkity.com> wrote: > >> On Thu, 19 Feb 2015, Julian Elischer wrote: >> >> On 2/18/15 3:41 PM, Xin Li wrote: >>> >>>> >>>> The _only_ reason that I can think of is that more(1) does not clear >>>> screen for certain terminals (done with 'ti' and 'te' sequences), >>>> while less(1) when running as less does. >>>> >>>> The less(1) behavior can be annoying to some people (sometimes even >>>> myself when using less to show contents of a file and ^Z to paste >>>> them), and unfortunately quite a few of them also happen to be the >>>> more vocal ones when it comes to a change. >>>> >>> >>> I find that behaviour infuriating >>> >>> I page down to a place to get some text on the screen to use as a >>> reference, then exit to run a command with that information, and *bam* the >>> info I wanted to use has gone away. >>> >> >> It doesn't do that on csh. Or maybe I figured out how to prevent it long >> ago and forgot, but all I use is this: >> >> setenv PAGER "less -RS" >> > > You probably did what I used to do. Modify the termcaps/terminfo to > eliminate this behavior. See Exorcising the Evil Alternate Screen > <http://shallowsky.com/linux/noaltscreen.html>. > > In the past, FreeBSD disabled this by default. It was changed several > years ago, but you can change it back as per the above referenced article. > > Well, I just looked at this and it looks like FreeBSD is using termcap, not terminfo. So you can "fix" this by defining TERM to a version of xterm that does not define alternate screen. I use xterm which, rather surprisingly, does not define ti or te. Neither do any of the xterm variants that I can find in termcap. (N.B. I am NOT running xterm. I am using mate-terminal, but it still works.) rxvt variants do define them, as do a great many others. Take a look at /usr/share/misc/termcap. Just remember that editing it does nothing until termcap.db is rebuilt. -- Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1uO0WrxpcEtPO9AXUNBsfmhnSrwxKX7KrLgH5aCJNpSRQ>