zsh: up-line-or-history does not work in urxvt

382 Views Asked by At

up-line-or-history works well in gnome-terminal, but does not work after I switched to urxvt. I've tested this by explicitly calling this command in zsh (M-x in emacs mode). Can anyone give me a clue of why? I'm on Debian Jessie.

1

There are 1 best solutions below

1
Thomas Dickey On

urxvt and gnome-terminal send different characters when you type altup. You can see this using cat -v. In urxvt, you would see ^[[A, while gnome-terminal copies xterm, sending ^[[;3A`.

Unless you have configured your zsh key bindings to take that into account, they will not work as expected. Some workarounds are needed, because (although zsh can use terminfo values), zsh does not provide a way to use the terminal information for modified special keys.

Further reading: