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

Re: Recently changed behavior with moving between CTRL-R history search to vi mode



On Jun 15,  4:59pm, Cory Klein wrote:
}
} 1. CTRL-R
} 2. search for command
} 3. ESC to end history search, placing result into command prompt
} 4. ESC again to enter vi mode
} 5. w/l/other vi movement key
} 
} However, recently I'm seeing that in some cases my shell is combining
} the ESC from 4 with the movement key from 5

This is the right place to ask, but I'm not able to reproduce a problem.
This bit --

} ESC-l => insert "ls" in the current cursor position and execute the
} command immediately (huh?)

-- makes me believe that some other bindings are getting involved.

Try this:

    PS1="%v |$PS1"
    zle-keymap-select() { psvar=("$1 -> $KEYMAP"); zle reset-prompt }
    zle -N zle-keymap-select

This should cause your prompt to look like e.g.

main -> vicmd |torch% 

after you hit the first ESC.  If that's not what it looks like, that is
if it says something other than "vicmd" to the right of the ->, then
whatever it does say will be a clue.

(If you're already using psvar / %v for some other prompt configuration,
there are other ways to display the same information.)



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