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

vi-history-search(forward|backward) vicmd mappings



Hullo

The default vicmd mappings for

    vi-history-search-forward (?)

and

    vi-history-search-backward (/)

have confused me.

vi(m)-like behaviour is always to have '/' search forward and
'?' search backward.

Say my, notional, .zhistory file contains:

    foo
    bar
    baz
    qux

The search appears to begin at the last line 'qux' - as if the
history file is read in as 'vi +G .zhistory' - so to search
backwards for 'foo', I would - in vi - enter '<ESC>?' and, once
there, enter '/' to search forwards for 'baz' but it seems to be
the opposite in zsh.

In fact, if one enters '<ESC>?' on a zsh command line with
'bindkey -e' in effect the mini-buffer prompt becomes '/' to
signify a forward search, and '<ESC>/' produces a '?' to signify
a backward search, so I propose that the default mappings are,
perhaps, backwards?

Or am I missing something?



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