Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: accept-and-infer-next-history is broken?



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   



Messages sorted by: Reverse Date, Date, Thread, Author