]> Sergey Matveev's repositories - dotfiles.git/blobdiff - zsh/.zsh/rc/010history.zsh
Splitted zsh rc files
[dotfiles.git] / zsh / .zsh / rc / 010history.zsh
diff --git a/zsh/.zsh/rc/010history.zsh b/zsh/.zsh/rc/010history.zsh
new file mode 100644 (file)
index 0000000..1a0a9e6
--- /dev/null
@@ -0,0 +1,13 @@
+autoload -U history-search-end
+zle -N history-beginning-search-backward-end history-search-end
+zle -N history-beginning-search-forward-end history-search-end
+bindkey "^[[A" history-beginning-search-backward-end
+bindkey "^[[B" history-beginning-search-forward-end
+
+beginning-history-incremental-pattern-search-backward() {
+    zle history-incremental-pattern-search-backward ${BUFFER:gs/ /*/}
+}
+zle -N beginning-history-incremental-pattern-search-backward
+bindkey "^[[1;2A" beginning-history-incremental-pattern-search-backward
+bindkey -M isearch "^[[A" history-incremental-pattern-search-backward
+bindkey -M isearch "^[[B" history-incremental-pattern-search-forward