aboutsummaryrefslogtreecommitdiff
path: root/history-substring-search.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'history-substring-search.plugin.zsh')
-rw-r--r--history-substring-search.plugin.zsh13
1 files changed, 13 insertions, 0 deletions
diff --git a/history-substring-search.plugin.zsh b/history-substring-search.plugin.zsh
new file mode 100644
index 0000000..7f14b38
--- /dev/null
+++ b/history-substring-search.plugin.zsh
@@ -0,0 +1,13 @@
+
+
+# Bind terminal-specific up and down keys
+
+if [[ -n "$terminfo[kcuu1]" ]]; then
+ bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up
+ bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up
+fi
+if [[ -n "$terminfo[kcud1]" ]]; then
+ bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down
+ bindkey -M viins "$terminfo[kcud1]" history-substring-search-down
+fi
+