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

Re: zshzle: aborting history search



On Sat, 17 Jul 2004, Wayne Davison wrote:

> On Sat, Jul 17, 2004 at 04:49:01PM -0000, Georg Neis wrote:
> > How can I abort history-incremental-search-backward *without* losing
> > the text that I'm searching for (useful when zsh says "failing
> > bck-i-search")?
> 
> If you want to go back to where you started your search, just press
> Ctrl-G.

That doesn't work do what he wants; send-break discards the search text,
so, e.g., you can't resume searching for the same thing again later by
pressing the history-incremental-search-backward binding twice in a row.

> If you want to stay on the current line, execute almost any
> editor-movement command, such as Ctrl-E, Ctrl-B, Right-Arrow, etc.

This on the other hand does have the effect of saving the search text.  
So the closest you can get to having both is to invoke end-of-history; but 
that's not normally bound to anything, so you have to create a binding for 
it first.



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