On my old machine (Ubuntu 17.04), I added the following entries to my .zshrc:

bindkey "${key[Up]}" up-line-or-local-history
bindkey "${key[Down]}" down-line-or-local-history

On my new machine (ZSH 5.5.1, homebrew on macOS 10.13), I get the error message "cannot bind to an empty key sequence". What's missing here to get this array $key filled with escape sequences?

Unfortunately, I don't have access to the old machine anymore. The .zshrc should be the same, as I keep my dotfiles in a git repo. Maybe I forgot to add some additional file in my home directory to version control, but I can't remember and also I can't look.

  • 1
    It sounds like if the $key (associative) array is empty. You can check with print ${(k)key} which should print all keys of this array. See this question on Unix.SE where $key might get defined. – mpy Jun 28 at 16:56

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.