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

Re: vi-mode intuitive history searching

On Thu, 20 Dec 2007 10:58:48 -0800
Micah Elliott <mde@xxxxxxxxxxxxxxxx> wrote:
>     bindkey -a / vi-history-search-backward
> But now "<Esc>/" gives this scary output:
>     zsh: do you wish to see all 1568 possibilities (1568 lines)? 

There's something screwy with your binding: you should only get that
output with completion.  I tried vi-history-search-backward (which is
already bound to / by default in the vicmd map) from "zsh -f" and it
works the way I think you're expecting (I'm not a regular vi mode user
and I couldn't with a quick search even find how to get readline into vi
mode, though I know it's easy and I have a strong suspicion I even put
it into the book(*)).  You should see a "?" prompt, then when you type a
series of keys and hit return it goes back to the previous occurrence.
"n" works like you said.

Are you sure you're in viins mode at the point where you type <Esc>/?
I presume you would know but it's hard to see what might have gone wrong.
You might check that 
  bindkey '\e/'
(run it like that) doesn't have some other binding in viins mode.  If
you type both keys quickly, instead of going to vicmd mode and invoking
/, it will invoke that binding.

(*) From Bash to Z-Shell; Kiddle, Peek and Stephenson; Apress.  Still

Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/

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