Re: annoying behavior in less(1) after v403 import

From: Xin LI <delphij_at_delphij.net>
Date: Sat, 16 Jun 2007 00:36:30 +0800
Hi, Ruslan,

Ruslan Ermilov wrote:
> On Thu, Jun 14, 2007 at 05:20:02PM -0600, Scott Long wrote:
[...]
> 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
> _at__at_ -135,6 +135,9 _at__at_ 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));
> %%%

Sounds sensible to me.  I think for the sake of POLA we do want to put
this on -HEAD (the file is already off the vendor branch anyway), please
feel free to commit it, thanks!

Cheers,
Received on Fri Jun 15 2007 - 14:36:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:12 UTC