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

Re: Ability to set HISTNO to a certain position from within zshrc

Thanks Bart.

I've tried your suggestions.  The "fc" and the print -z work well.  And I bind
the "enter" key to point to accept-and-infer-next-history.

Though ainh has a couple problems.  It's not a replacement for accept-line.  It
won't accept if it can't infer.  Peter(?) recently modified
accept-line-and-down-history to accept even if it can't go down in history.  I
suspect ainh could be modified too.  Though maybe the current behavior is

I wanted to start in the middle of history not the beginning.  So the lines
above the starting point contain commands that might need to be run, and the
starting line and following lines contain the likely sequence of commands to

With the "print -z"/ainh solution I lose the ability to have the leading
commands.   I don't want to place them in history after the likely command
sequence, (so they are just above "print -z" line) since I don't want to
accidentally run them through a series of ainh commands.

It almost seems like there should be a infer-back-into-history, where it
determines the inferred line, and jumps to it in history.  Maybe even an
accept-and-down-history-or-infer, which accepts,  attempts to go down in
history, and if at the end of the history, attempts to infer the next command.


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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