From d9b28ed7f9c62d843c6f3e599ab4f3aa0bdd37b5 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 19 Jun 2013 15:47:15 -0700 Subject: [PATCH] GH-21: bind arrow key codes according to terminfo --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d1f4f9f..db54d67 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,9 @@ Usage 2. Bind keyboard shortcuts to this script's functions: # bind UP and DOWN arrow keys - for keycode in '[' 'O'; do - bindkey "^[${keycode}A" history-substring-search-up - bindkey "^[${keycode}B" history-substring-search-down - done - unset keycode + zmodload zsh/terminfo + bindkey "$terminfo[kcuu1]" history-substring-search-up + bindkey "$terminfo[kcud1]" history-substring-search-down # bind P and N for EMACS mode bindkey -M emacs '^P' history-substring-search-up