Date: Fri, 15 Jun 2007 14:46:12 +0400 From: Ruslan Ermilov <ru@FreeBSD.org> To: Scott Long <scottl@samsco.org> Cc: Xin LI <delphij@FreeBSD.org>, current@FreeBSD.org Subject: Re: annoying behavior in less(1) after v403 import Message-ID: <20070615104612.GA40097@rambler-co.ru> In-Reply-To: <4671CD22.5030507@samsco.org> References: <4671C5AF.9040203@uffner.com> <4671CD22.5030507@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 14, 2007 at 05:20:02PM -0600, Scott Long wrote: > Tom Uffner wrote: > > the recently imported new version of less (Mon Jun 4 01:42:44 2007 UTC > > (10 days, 19 hours ago) by delphij) appears to have a bug that appears > > when using the -e or --quit-at-eof option. > > > > if you exit less by reaching eof for the 2nd time, the cursor is left > > at the end of the top line of the screen or window and the terminal is > > not restored to cooked mode. this results in your shell prompt printing > > on the 2nd line in the midst of whatever text happened to be on the > > screen at the time. if you exit less by typing 'q' this does not happen. > > > > this problem did not exist in previous versions. please don't allow this > > to slip into 7.0 release. i'd rather see it ship w/ less v394 than an > > unpatched v404. > > > > tom > > I noticed that, and I noticed a new regression/feature where you can > no longer run 'more' against a character device node unless you specify > the -f flag. So for example, running 'more /dev/sndstat' produces an > error now. It's minor, but my fingers, and I'm sure millions of other > BSD users fingers, are trained to typing 'more' and not 'more -f' or > 'cat foo | more'. > Previously -f, -E, -m and -G were enforced in FreeBSD version of more(1). New version of less(1) supports the "more" mode natively, and by default enforces -E and -m options (see the COMPATIBILITY WITH MORE section in a manpage). The -f and -G options are not enforced. Note that -f is now able to read directories too. The patch to restore the lost compatibility with our previous version of more(1) is trivial (see below), but I'm not sure it's worth to diverge from vendor since there are ways to achieve the desired compatibility level on a per user basis without the need to modify the sources, by setting the MORE environment variable appropriately, e.g.: % setenv MORE -f %%% Index: main.c =================================================================== RCS file: /home/ncvs/src/contrib/less/main.c,v retrieving revision 1.6 diff -u -p -r1.6 main.c --- main.c 4 Jun 2007 01:43:11 -0000 1.6 +++ main.c 15 Jun 2007 10:22:11 -0000 @@ -135,6 +135,9 @@ main(argc, argv) init_prompt(); + if (less_is_more) + scan_option("-fG"); + s = lgetenv(less_is_more ? "MORE" : "LESS"); if (s != NULL) scan_option(save(s)); %%% Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070615104612.GA40097>