zsh键绑定:无法绑定到空键序列

时间:2014-03-14 16:33:09

标签: shell zsh oh-my-zsh

zsh的最新更新在Mac OS X Maverick上产生以下错误: /Users/[username]/.oh-my-zsh/lib/key-bindings.zsh:bindkey:23: cannot bind to an empty key sequence

相应的行是:

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

Mac键盘上没有PageUp,PageDown,Home和End。我想知道为什么正确的密钥代码被bindkey认为是nil,或者如果$ {terminfo [kpp]条件应该是这样的]}是零。有什么想法吗?

1 个答案:

答案 0 :(得分:6)

这与$ terminfo在各平台之间不一致有关,提交已被还原,请参阅https://github.com/robbyrussell/oh-my-zsh/issues/2608了解详细信息。如果您安装了集线器工具,则快速修复是:

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

并重新加载你的shell。如果没有集线器,您需要首先为PR设置遥控器并从那里拉出。