From: Simon Ruderich Date: Wed, 12 Mar 2014 15:54:03 +0000 (+0100) Subject: zsh/rc: check for isearch keymap X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=1fca0311a9b2f77e4f48e7dfaec3bee82e13ec97 zsh/rc: check for isearch keymap It was added after 4.3.9. --- diff --git a/zsh/rc b/zsh/rc index f8adacf..9088961 100644 --- 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