+# Enable incremental search which is especially useful when the string is an
+# argument and not the command.
+bindkey '^R' history-incremental-search-backward
+# Also enable my usual use of Ctrl-P/Ctrl-N to get the previous/next matching
+# history entry.
+if [[ $ZSH_VERSION == (4.<4->*|<5->*) ]]; then
+ bindkey -M isearch '^P' history-incremental-search-backward
+ bindkey -M isearch '^N' history-incremental-search-forward
+fi
+