When I enter in vi mode with set -o vi, I enter in command mode, and I touch the key ? it produces a / and the reverse. Is it normal? How can I change this behavior?

  • 1
    Weird. For me, / produces / and ? produces ?, as expected. I use it all the time! Some sort of shell option? Note that / searches for earlier history entries, which is sort of backwards if you visualize history entries listed in chronological order on successive lines but I think it turns out to be intuitive. All of the this applies equally to zsh, bash, and ksh.
    – Celada
    Commented Aug 4, 2015 at 1:13

1 Answer 1


I added those keys :

bindkey -M vicmd '?' history-incremental-search-backward
bindkey -M vicmd '/' history-incremental-search-forward

I do as CTRL+R in emacs mode and I prefer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .