Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh key binding: cannot bind to an empty key sequence

The most recent update to zsh produced the following error on Mac OS X Maverick: /Users/[username]/.oh-my-zsh/lib/key-bindings.zsh:bindkey:23: cannot bind to an empty key sequence

The corresponding lines are:

bindkey "${terminfo[kpp]}" up-line-or-history       # [PageUp] - Up a line of history
bindkey "${terminfo[knp]}" down-line-or-history     # [PageDown] - Down a line of history

There is no PageUp, PageDown, Home and End on the Mac keyboard. I wonder why the correct key code is considered nil by bindkey or how the conditional should look like if ${terminfo[kpp]} is nil. Any ideas?

like image 968
Alexei Danchenkov Avatar asked Mar 14 '14 16:03

Alexei Danchenkov


1 Answers

It has to do with $terminfo not being consistent across platforms, the commit has been reverted see https://github.com/robbyrussell/oh-my-zsh/issues/2608 for details. If you got the hub tool installed the quick fix is:

cd ~/.oh-my-zsh 
hub checkout https://github.com/robbyrussell/oh-my-zsh/pull/2625 terminfo_fix

and reload your shell. Without hub you need to setup the remote for the PR first and pull from there.

like image 129
Sideshowcoder Avatar answered Oct 21 '22 18:10

Sideshowcoder