zsh-workers
 help / color / mirror / code / Atom feed
From: Vin Shelton <acs@alumni.princeton.edu>
To: Wayne Davison <wayned@users.sourceforge.net>
Cc: Zsh Workers <zsh-workers@sunsite.dk>
Subject: Re: history problems
Date: 17 Sep 2001 22:24:13 -0400	[thread overview]
Message-ID: <m2sndlb5iq.fsf@zion.rcn.com> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0109171035320.20148-100000@phong.blorf.net>

This works fine for me, and I think the proposed semantic change is
fine.

  - vin

Wayne Davison <wayned@users.sourceforge.net> 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..


      reply	other threads:[~2001-09-18  2:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-16 18:16 Vin Shelton
2001-09-16 21:31 ` Bart Schaefer
2001-09-17 17:56   ` Wayne Davison
2001-09-18  2:24     ` Vin Shelton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2sndlb5iq.fsf@zion.rcn.com \
    --to=acs@alumni.princeton.edu \
    --cc=wayned@users.sourceforge.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).