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

Re: Control keys not working in xterm



Bjoern Lindstroem wrote:
> 
> When I run zsh in an xterm pressing ^P, ^N, ^F, ^B, ^A etc. inputs '^P'
> etc.  instead of the commands normally associated with them. Does anyone
> have a clue on what to do about this?

You're probably in vi mode so you'll have the vi-like key bindings. You
can switch to the emacs key bindings by typing:

bindkey -e

^P etc should then work.

I would guess that the cause of this is something to do with the $EDITOR
variable set to vi. Most shells use vi key bindings in this case but it
is a feature which I find can be annoying. You mention this key problem
as being the case when you run zsh in an xterm. They significant
difference in this case is often that shells running in an xterm are not
login shells so you might find that something in .zlogin or .zprofile
which you're expecting to be run is not.

Oliver Kiddle



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