From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29010 invoked from network); 18 Sep 2001 02:22:46 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Sep 2001 02:22:46 -0000 Received: (qmail 18915 invoked by alias); 18 Sep 2001 02:22:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15839 Received: (qmail 18902 invoked from network); 18 Sep 2001 02:22:34 -0000 Sender: ethersoft@rcn.com To: Wayne Davison Cc: Zsh Workers Subject: Re: history problems References: From: Vin Shelton Organization: EtherSoft, Inc Date: 17 Sep 2001 22:24:13 -0400 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii This works fine for me, and I think the proposed semantic change is fine. - vin Wayne Davison writes: > On Sun, 16 Sep 2001, Bart Schaefer wrote: > > This is an unintended side-effect of Wayne's patch in 15806. One > > possible fix is appended; Wayne may have a better idea. > > Here's my suggested fix. > > Since the fcgetcomm() function is only called when doing a history list, > I don't see why the function is complaining if the numeric values are > out of bounds -- the list function fixes these up to be valid already. > So, I changed the function to just limit the lower range so that it > couldn't return a -1. I also allow the user to be able to type a > history number of 0. > > Also, I can't find any reason for the "minflag" code to exist. Way back > before I started changing things, it looks to me like the code that used > the minflag value could never get executed. So, I've removed minflag. > > The end result is that the user can now type invalid values and have > them get rounded off. For instance, "history 0 99999" will output the > entire history buffer, as will "history -99999 99999". (Older zsh > versions would reject this as invalid because of the too-high end > value.) Someone wanting to output a single line would use something > like this: "history -20 1" (since the ending value will get rounded up > to the first value). > > Anyone believe that this should work differently? > > ..wayne..