summaryrefslogtreecommitdiff
path: root/plugins/history-substring-search/history-substring-search.plugin.zsh
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2015-11-27 16:59:41 +0100
committerMarc Cornellà <marc.cornella@live.com>2015-11-27 16:59:41 +0100
commit96108e1130964dd49e3467e117ee409f8e467455 (patch)
tree523df3b41863e53712fb030430e24429395c8ccb /plugins/history-substring-search/history-substring-search.plugin.zsh
parentbefb5b66c5d5b5af294dc18ea0d122754a42de89 (diff)
parent7e398391dbd11a1974c8b35913d268853a8a21be (diff)
downloadzsh-96108e1130964dd49e3467e117ee409f8e467455.tar.gz
zsh-96108e1130964dd49e3467e117ee409f8e467455.tar.bz2
zsh-96108e1130964dd49e3467e117ee409f8e467455.zip
Merge branch 'apjanke-histsubstr-update-2015_04_26'
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
+