From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18622 invoked from network); 26 May 2001 01:22:37 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 May 2001 01:22:37 -0000 Received: (qmail 22487 invoked by alias); 26 May 2001 01:22:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14486 Received: (qmail 22476 invoked from network); 26 May 2001 01:22:05 -0000 From: "Bart Schaefer" Message-Id: <1010526012125.ZM18237@candle.brasslantern.com> Date: Sat, 26 May 2001 01:21:25 +0000 In-Reply-To: Comments: In reply to Wayne Davison "Re: accept-and-infer-next-history is broken?" (May 25, 1:47pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Subject: Re: accept-and-infer-next-history is broken? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 25, 1:47pm, Wayne Davison wrote: } } if (we have a line in the history below us } && the current line is unchanged from the history version) { } use the next line; } else } search from the bottom of the history for a match and infer; This sounds like exactly what I expected it to do, and this ... } Another change I made was to have the code ignore the transient edits in } the history list when it is searching for and storing the inferred line ... is also something I'd been wishing for. } This means that a-a-i-n-h works just like accept-line-and-down-history } after the first inferred line. An alternate approach would be to just } always start the search from the bottom of the history. Thoughts? Well, here's the thing ... I use `setopt hist_expire_dups_first'. My fear is that the next thing that I'd like inferred, might have expired. I DON'T want inferences to skip over the expired history slots and use what follows ... I'd rather have it feep at me. On the other hand, I'd like to have the best chance possible of inferring something useful. So whether the algorithm needs to always search from the bottom depends on what "we have a line in the history below us" means. } Finally, I changed the function to be like a-l-a-down-history in that it } does not set "done = 1" if the infer fails. What practical effect does that have, exactly? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net