]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh/rc: check for isearch keymap
authorSimon Ruderich <simon@ruderich.org>
Wed, 12 Mar 2014 15:54:03 +0000 (16:54 +0100)
committerSimon Ruderich <simon@ruderich.org>
Wed, 12 Mar 2014 15:54:03 +0000 (16:54 +0100)
It was added after 4.3.9.

zsh/rc

diff --git a/zsh/rc b/zsh/rc
index f8adacf317b64b7cde56d1c258c74e47a93dcf2c..908896121d042ad4f7123c04a9367b7a9c48ae1a 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -187,8 +187,10 @@ bindkey -a '^N' history-beginning-search-forward
 bindkey '^R' history-incremental-search-backward
 # Also enable my usual use of Ctrl-P/Ctrl-N to get the previous/next matching
 # history entry.
-bindkey -M isearch '^P' history-incremental-search-backward
-bindkey -M isearch '^N' history-incremental-search-forward
+if [[ $ZSH_VERSION == (4.<4->*|<5->*) ]]; then
+    bindkey -M isearch '^P' history-incremental-search-backward
+    bindkey -M isearch '^N' history-incremental-search-forward
+fi
 
 # Automatically push cd-ed directories on the directory stack.
 setopt autopushd