Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zshzle: aborting history search
- X-seq: zsh-users 7711
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: zshzle: aborting history search
- Date: Sat, 17 Jul 2004 19:31:05 -0700 (PDT)
- In-reply-to: <dbe.40f97840.4f0d2@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <7b9.40f9587d.a8ae6@xxxxxxxxxxxxxxxxxxx> <20040717184743.GA9358@xxxxxxxxx> <dbe.40f97840.4f0d2@xxxxxxxxxxxxxxxxxxx>
- Reply-to: zsh-users@xxxxxxxxxx
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
Choose your own binding in place of escape-e, I just picked something that
isn't bound by default. The "end-of-history" isn't strictly necessary,
but it means you aren't left with a modified buffer in the middle of the
history after the first part of the incremental scan.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author