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

Re: zshzle: aborting history search



* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sat, 17 Jul 2004, Georg Neis wrote:
> 
> > "bck-i-search: cat /fo" turns into "failing bck-i-search: cat /fo" 
> > because the command is (for whatever reasons) not in my history file. 
> > Now I want to [move] "cat /fo" from the search prompt to the normal 
> > command prompt
> 
> copy-search-as-buffer() { zle end-of-history; BUFFER="$LASTSEARCH" }
> zle -N copy-search-as-buffer
> bindkey '\ee' copy-search-as-buffer

Great - that works.  I only added CURSOR="$#BUFFER" to the function's
definition.

So long, and thanks for all the answers!



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