Re: UPDATE: usr.bin/less
Thanks. ok nicm On Thu, Oct 06, 2011 at 11:07:50PM +0600, Alexandr Shadchin wrote: > Option -E is different for "less" and "more". > > for "less" - causes to automatically exit the first time it reaches > end-of-file. > > for "more" - option -E and -e is equivalent and causes to automatically > exit the second time it reaches end-of-file. > > Behaviour "exit the first time it reaches end-of-file" set on default for > "more", therefore was removed scan_option("-E"). > > This patch return the old behaviour: > Index: command.c > === > RCS file: /cvs/src/usr.bin/less/command.c,v > retrieving revision 1.10 > diff -u -p -r1.10 command.c > --- command.c 21 Sep 2011 19:01:49 - 1.10 > +++ command.c 6 Oct 2011 16:58:18 - > @@ -55,6 +55,8 @@ extern int shift_count; > extern int oldbot; > extern int forw_prompt; > extern int be_helpful; > +extern int less_is_more; > +extern int quit_at_eof; > > #if SHELL_ESCAPE > static char *shellcmd = NULL;/* For holding last shell command for > "!!" */ > @@ -1232,6 +1234,8 @@ commands() >*/ > if (sigs && !ABORT_SIGS()) > newaction = A_F_FOREVER; > + if (less_is_more) > + quit_at_eof = OPT_ON; > break; > > case A_F_SCROLL: > > > On Thu, Oct 06, 2011 at 03:26:10PM +0100, Nicholas Marriott wrote: > > Yep they seem to have actually changed the behaviour of -E, I've been > > looking to see if we can restore the old behaviour but haven't got it > > yet. > > > > > > > > On Thu, Oct 06, 2011 at 02:46:27PM +0100, Stuart Henderson wrote: > > > Oh hmm I was slightly mistaken; G did actually exit more before, > > > so only the behaviour of F ^C has changed. > > > > > > Thanks for pointing out -E, that changes behaviour of both G and > > > F^C (which I can quite imagine some people won't want) but I am happy > > > to set that in MORE for myself. > > > > > > > > > > > > On 2011/10/06 13:51, Nicholas Marriott wrote: > > > > Does this restore the old behaviour? > > > > > > > > I don't remember why -E was left out... Alexandr? > > > > > > > > > > > > Index: main.c > > > > === > > > > RCS file: /cvs/src/usr.bin/less/main.c,v > > > > retrieving revision 1.11 > > > > diff -u -p -r1.11 main.c > > > > --- main.c 16 Sep 2011 18:12:09 - 1.11 > > > > +++ main.c 6 Oct 2011 12:50:24 - > > > > @@ -135,6 +135,7 @@ main(argc, argv) > > > > init_prompt(); > > > > > > > > if (less_is_more) { > > > > + scan_option("-E"); > > > > scan_option("-G"); > > > > scan_option("-L"); > > > > scan_option("-X"); > > > > > > > > > > > > On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote: > > > > > With the old version of less, when called as either "more" or "less", > > > > > if you press either G or F ^C, you would be left at a prompt at the > > > > > end > > > > > of the file. > > > > > > > > > > In the updated version these differ; called as "less" this works fine, > > > > > but as "more" it exits. > > > > > > > > > > Not sure if this is intentional but I'm finding it quite annoying as > > > > > I find it a lot easier to type "more" than "less".. > > > > > > -- > Alexandr Shadchin
Re: UPDATE: usr.bin/less
Option -E is different for "less" and "more". for "less" - causes to automatically exit the first time it reaches end-of-file. for "more" - option -E and -e is equivalent and causes to automatically exit the second time it reaches end-of-file. Behaviour "exit the first time it reaches end-of-file" set on default for "more", therefore was removed scan_option("-E"). This patch return the old behaviour: Index: command.c === RCS file: /cvs/src/usr.bin/less/command.c,v retrieving revision 1.10 diff -u -p -r1.10 command.c --- command.c 21 Sep 2011 19:01:49 - 1.10 +++ command.c 6 Oct 2011 16:58:18 - @@ -55,6 +55,8 @@ extern int shift_count; extern int oldbot; extern int forw_prompt; extern int be_helpful; +extern int less_is_more; +extern int quit_at_eof; #if SHELL_ESCAPE static char *shellcmd = NULL; /* For holding last shell command for "!!" */ @@ -1232,6 +1234,8 @@ commands() */ if (sigs && !ABORT_SIGS()) newaction = A_F_FOREVER; + if (less_is_more) + quit_at_eof = OPT_ON; break; case A_F_SCROLL: On Thu, Oct 06, 2011 at 03:26:10PM +0100, Nicholas Marriott wrote: > Yep they seem to have actually changed the behaviour of -E, I've been > looking to see if we can restore the old behaviour but haven't got it > yet. > > > > On Thu, Oct 06, 2011 at 02:46:27PM +0100, Stuart Henderson wrote: > > Oh hmm I was slightly mistaken; G did actually exit more before, > > so only the behaviour of F ^C has changed. > > > > Thanks for pointing out -E, that changes behaviour of both G and > > F^C (which I can quite imagine some people won't want) but I am happy > > to set that in MORE for myself. > > > > > > > > On 2011/10/06 13:51, Nicholas Marriott wrote: > > > Does this restore the old behaviour? > > > > > > I don't remember why -E was left out... Alexandr? > > > > > > > > > Index: main.c > > > === > > > RCS file: /cvs/src/usr.bin/less/main.c,v > > > retrieving revision 1.11 > > > diff -u -p -r1.11 main.c > > > --- main.c16 Sep 2011 18:12:09 - 1.11 > > > +++ main.c6 Oct 2011 12:50:24 - > > > @@ -135,6 +135,7 @@ main(argc, argv) > > > init_prompt(); > > > > > > if (less_is_more) { > > > + scan_option("-E"); > > > scan_option("-G"); > > > scan_option("-L"); > > > scan_option("-X"); > > > > > > > > > On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote: > > > > With the old version of less, when called as either "more" or "less", > > > > if you press either G or F ^C, you would be left at a prompt at the end > > > > of the file. > > > > > > > > In the updated version these differ; called as "less" this works fine, > > > > but as "more" it exits. > > > > > > > > Not sure if this is intentional but I'm finding it quite annoying as > > > > I find it a lot easier to type "more" than "less".. > > > -- Alexandr Shadchin
Re: UPDATE: usr.bin/less
Yep they seem to have actually changed the behaviour of -E, I've been looking to see if we can restore the old behaviour but haven't got it yet. On Thu, Oct 06, 2011 at 02:46:27PM +0100, Stuart Henderson wrote: > Oh hmm I was slightly mistaken; G did actually exit more before, > so only the behaviour of F ^C has changed. > > Thanks for pointing out -E, that changes behaviour of both G and > F^C (which I can quite imagine some people won't want) but I am happy > to set that in MORE for myself. > > > > On 2011/10/06 13:51, Nicholas Marriott wrote: > > Does this restore the old behaviour? > > > > I don't remember why -E was left out... Alexandr? > > > > > > Index: main.c > > === > > RCS file: /cvs/src/usr.bin/less/main.c,v > > retrieving revision 1.11 > > diff -u -p -r1.11 main.c > > --- main.c 16 Sep 2011 18:12:09 - 1.11 > > +++ main.c 6 Oct 2011 12:50:24 - > > @@ -135,6 +135,7 @@ main(argc, argv) > > init_prompt(); > > > > if (less_is_more) { > > + scan_option("-E"); > > scan_option("-G"); > > scan_option("-L"); > > scan_option("-X"); > > > > > > On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote: > > > With the old version of less, when called as either "more" or "less", > > > if you press either G or F ^C, you would be left at a prompt at the end > > > of the file. > > > > > > In the updated version these differ; called as "less" this works fine, > > > but as "more" it exits. > > > > > > Not sure if this is intentional but I'm finding it quite annoying as > > > I find it a lot easier to type "more" than "less"..
Re: UPDATE: usr.bin/less
Oh hmm I was slightly mistaken; G did actually exit more before, so only the behaviour of F ^C has changed. Thanks for pointing out -E, that changes behaviour of both G and F^C (which I can quite imagine some people won't want) but I am happy to set that in MORE for myself. On 2011/10/06 13:51, Nicholas Marriott wrote: > Does this restore the old behaviour? > > I don't remember why -E was left out... Alexandr? > > > Index: main.c > === > RCS file: /cvs/src/usr.bin/less/main.c,v > retrieving revision 1.11 > diff -u -p -r1.11 main.c > --- main.c16 Sep 2011 18:12:09 - 1.11 > +++ main.c6 Oct 2011 12:50:24 - > @@ -135,6 +135,7 @@ main(argc, argv) > init_prompt(); > > if (less_is_more) { > + scan_option("-E"); > scan_option("-G"); > scan_option("-L"); > scan_option("-X"); > > > On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote: > > With the old version of less, when called as either "more" or "less", > > if you press either G or F ^C, you would be left at a prompt at the end > > of the file. > > > > In the updated version these differ; called as "less" this works fine, > > but as "more" it exits. > > > > Not sure if this is intentional but I'm finding it quite annoying as > > I find it a lot easier to type "more" than "less"..
Re: UPDATE: usr.bin/less
Does this restore the old behaviour? I don't remember why -E was left out... Alexandr? Index: main.c === RCS file: /cvs/src/usr.bin/less/main.c,v retrieving revision 1.11 diff -u -p -r1.11 main.c --- main.c 16 Sep 2011 18:12:09 - 1.11 +++ main.c 6 Oct 2011 12:50:24 - @@ -135,6 +135,7 @@ main(argc, argv) init_prompt(); if (less_is_more) { + scan_option("-E"); scan_option("-G"); scan_option("-L"); scan_option("-X"); On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote: > With the old version of less, when called as either "more" or "less", > if you press either G or F ^C, you would be left at a prompt at the end > of the file. > > In the updated version these differ; called as "less" this works fine, > but as "more" it exits. > > Not sure if this is intentional but I'm finding it quite annoying as > I find it a lot easier to type "more" than "less"..
Re: UPDATE: usr.bin/less
With the old version of less, when called as either "more" or "less", if you press either G or F ^C, you would be left at a prompt at the end of the file. In the updated version these differ; called as "less" this works fine, but as "more" it exits. Not sure if this is intentional but I'm finding it quite annoying as I find it a lot easier to type "more" than "less"..
Re: UPDATE: usr.bin/less
On Thu, Sep 08, 2011 at 06:31:24PM +0100, Nicholas Marriott wrote: > I like dropping the configure goo. > > - What about options -m and -E which the old less added for more? > > - The more prompt is now --More-- which is a lot less useful than the > filename (and is not POSIX I believe). > Section "Compatibility with more" in new less.1: If the environment variable LESS_IS_MORE is set to 1, or if the program is invoked via a file link named "more", less behaves (mostly) in conformance with the POSIX "more" command specification. In this mode, less behaves differently in these ways: The -e option works differently. If the -e option is not set, less behaves as if the -E option were set. If the -e option is set, less behaves as if the -e and -F options were set. The -m option works differently. If the -m option is not set, the medium prompt is used, and it is prefixed with the string "--More--". If the -m option is set, the short prompt is used. Hence we see: * For "more" options -m and -E set by default * With --More-- all a bit more complicated. From less.1, I realized that --More-- is the correct behavior, but you made me doubt :) I have read POSIX (http://pubs.opengroup.org/onlinepubs/009695399/utilities/more.html) I found no hard requirements --More--. I agree with you that the old behavior is better. I fixed it. New diff http://koba.devio.us/distfiles/less.v3.diff -- Alexandr Shadchin
Re: UPDATE: usr.bin/less
I like dropping the configure goo. - What about options -m and -E which the old less added for more? - The more prompt is now --More-- which is a lot less useful than the filename (and is not POSIX I believe). On Sat, Sep 03, 2011 at 10:29:42PM +0600, Alexandr Shadchin wrote: > On Tue, Aug 30, 2011 at 10:37:15PM +0600, Alexandr Shadchin wrote: > > Hi, > > > > http://koba.devio.us/distfiles/less.diff > > > > This update less to the latest release 444. > > Tested on i386 and amd64. > > > > Change build system ( or leave old ? ): > > * no configure, used prepared define.h > > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile > > > > Please test on other arch. > > > > Comments ? OK ? > > > > -- > > Alexandr Shadchin > > > > New diff http://koba.devio.us/distfiles/less.v2.diff > > Changes: > * for "more" added option -X (Don't use termcap init/deinit strings). > This fixes: >if you do "more /some/file" where the file is less than a screen-full, >the display flashes but nothing is left on-screen. > > -- > Alexandr Shadchin
Re: UPDATE: usr.bin/less
On Fri, Sep 02, 2011 at 05:24:52PM +0200, Matthieu Herrb wrote: > On Fri, Sep 02, 2011 at 09:14:45PM +0600, Alexandr Shadchin wrote: > > On Fri, Sep 02, 2011 at 10:25:49AM +0200, Martin Pieuchot wrote: > > > On 30/08/11(Tue) 22:37, Alexandr Shadchin wrote: > > > > Hi, > > > > > > > > http://koba.devio.us/distfiles/less.diff > > > > > > > > This update less to the latest release 444. > > > > Tested on i386 and amd64. > > > > > > > > Change build system ( or leave old ? ): > > > > * no configure, used prepared define.h > > > > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile > > > > > > I am in favor of the new and simple Makefiles, but do we need to keep > > > the configure script in that case? > > > > > > > I not removed configure script. I have had in mind that it does not need to > > run. > > > > It's generally easier for future imports of newer versions to keep all > distributed files. > I would also like keep all distributed files. Someone will be against it? > > > > Please test on other arch. > > > > > > > > Comments ? OK ? > > > > > > This update fixes an issue for me here at work on amd64, I'll test on more > > > archs this WE. > > > > > > Martin > > > > -- > > Alexandr Shadchin > > > > -- > Matthieu Herrb -- Alexandr Shadchin
Re: UPDATE: usr.bin/less
On Tue, Aug 30, 2011 at 10:37:15PM +0600, Alexandr Shadchin wrote: > Hi, > > http://koba.devio.us/distfiles/less.diff > > This update less to the latest release 444. > Tested on i386 and amd64. > > Change build system ( or leave old ? ): > * no configure, used prepared define.h > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile > > Please test on other arch. > > Comments ? OK ? > > -- > Alexandr Shadchin > New diff http://koba.devio.us/distfiles/less.v2.diff Changes: * for "more" added option -X (Don't use termcap init/deinit strings). This fixes: if you do "more /some/file" where the file is less than a screen-full, the display flashes but nothing is left on-screen. -- Alexandr Shadchin
Re: UPDATE: usr.bin/less
On Fri, Sep 02, 2011 at 09:14:45PM +0600, Alexandr Shadchin wrote: > On Fri, Sep 02, 2011 at 10:25:49AM +0200, Martin Pieuchot wrote: > > On 30/08/11(Tue) 22:37, Alexandr Shadchin wrote: > > > Hi, > > > > > > http://koba.devio.us/distfiles/less.diff > > > > > > This update less to the latest release 444. > > > Tested on i386 and amd64. > > > > > > Change build system ( or leave old ? ): > > > * no configure, used prepared define.h > > > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile > > > > I am in favor of the new and simple Makefiles, but do we need to keep > > the configure script in that case? > > > > I not removed configure script. I have had in mind that it does not need to > run. > It's generally easier for future imports of newer versions to keep all distributed files. > > > Please test on other arch. > > > > > > Comments ? OK ? > > > > This update fixes an issue for me here at work on amd64, I'll test on more > > archs this WE. > > > > Martin > > -- > Alexandr Shadchin > -- Matthieu Herrb
Re: UPDATE: usr.bin/less
On Fri, Sep 02, 2011 at 10:25:49AM +0200, Martin Pieuchot wrote: > On 30/08/11(Tue) 22:37, Alexandr Shadchin wrote: > > Hi, > > > > http://koba.devio.us/distfiles/less.diff > > > > This update less to the latest release 444. > > Tested on i386 and amd64. > > > > Change build system ( or leave old ? ): > > * no configure, used prepared define.h > > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile > > I am in favor of the new and simple Makefiles, but do we need to keep > the configure script in that case? > I not removed configure script. I have had in mind that it does not need to run. > > Please test on other arch. > > > > Comments ? OK ? > > This update fixes an issue for me here at work on amd64, I'll test on more > archs this WE. > > Martin -- Alexandr Shadchin
Re: UPDATE: usr.bin/less
On 30/08/11(Tue) 22:37, Alexandr Shadchin wrote: > Hi, > > http://koba.devio.us/distfiles/less.diff > > This update less to the latest release 444. > Tested on i386 and amd64. > > Change build system ( or leave old ? ): > * no configure, used prepared define.h > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile I am in favor of the new and simple Makefiles, but do we need to keep the configure script in that case? > Please test on other arch. > > Comments ? OK ? This update fixes an issue for me here at work on amd64, I'll test on more archs this WE. Martin
Re: UPDATE: usr.bin/less
>> The version of less is in base is under a BSD equivalent license, the one >> you're updating us to is.. GPLv3. > Ah, nevermind. It's actually under a dual BSD-alike and GPLv3 license. Hmm. The version in base is actually dual licensed as well, (but GPLv2).
Re: UPDATE: usr.bin/less
On Tue, Aug 30, 2011 at 01:45:04PM -0400, Brynet wrote: > The version of less is in base is under a BSD equivalent license, the one > you're updating us to is.. GPLv3. > > -Bryan. Ah, nevermind. It's actually under a dual BSD-alike and GPLv3 license. Hmm. -Bryan.
Re: UPDATE: usr.bin/less
The version of less is in base is under a BSD equivalent license, the one you're updating us to is.. GPLv3. -Bryan.