summaryrefslogtreecommitdiff
path: root/plugins/history-substring-search/history-substring-search.plugin.zsh
diff options
context:
space:
mode:
authorAndrew Janke <andrew@apjanke.net>2015-07-07 16:48:05 -0400
committerMarc Cornellà <marc.cornella@live.com>2015-11-27 16:59:06 +0100
commit7e398391dbd11a1974c8b35913d268853a8a21be (patch)
tree523df3b41863e53712fb030430e24429395c8ccb /plugins/history-substring-search/history-substring-search.plugin.zsh
parentd7e6ba0b66fd65c71e9e3d4a4a5216dfde141944 (diff)
downloadzsh-7e398391dbd11a1974c8b35913d268853a8a21be.tar.gz
zsh-7e398391dbd11a1974c8b35913d268853a8a21be.tar.bz2
zsh-7e398391dbd11a1974c8b35913d268853a8a21be.zip
history-substring-search: update to upstream version 2015-09-28
Updates OMZ's copy to commit 2c295432175990c1bb4e90bc13f609daa67a25d6 from zsh-users/zsh-history-substring-search
Diffstat (limited to 'plugins/history-substring-search/history-substring-search.plugin.zsh')
-rw-r--r--plugins/history-substring-search/history-substring-search.plugin.zsh15
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/history-substring-search/history-substring-search.plugin.zsh b/plugins/history-substring-search/history-substring-search.plugin.zsh
index 99a5922c5..25fd3a2da 100644
--- a/plugins/history-substring-search/history-substring-search.plugin.zsh
+++ b/plugins/history-substring-search/history-substring-search.plugin.zsh
@@ -1,6 +1,6 @@
-# This file integrates the history-substring-search script into oh-my-zsh.
+# This file integrates the zsh-history-substring-search script into oh-my-zsh.
-source "$ZSH/plugins/history-substring-search/history-substring-search.zsh"
+source "${0:r:r}.zsh"
if test "$CASE_SENSITIVE" = true; then
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
@@ -10,3 +10,14 @@ if test "$DISABLE_COLOR" = true; then
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
fi
+
+
+# Bind terminal-specific up and down keys
+
+if [[ -n "$terminfo[kcuu1]" ]]; then
+ bindkey "$terminfo[kcuu1]" history-substring-search-up
+fi
+if [[ -n "$terminfo[kcud1]" ]]; then
+ bindkey "$terminfo[kcud1]" history-substring-search-down
+fi
+