1
0
Fork 0
mirror of synced 2024-11-18 05:55:34 -05:00
zimfw/modules/history-substring-search/init.zsh
2015-12-19 09:48:29 -05:00

19 lines
613 B
Bash

#
# enables searching history with substrings
#
# source script
source ${0:h}/external/zsh-history-substring-search.zsh || return 1
# set options
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'
HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'
# bind UP and DOWN keys
bindkey "${terminfo[kcuu1]}" history-substring-search-up
bindkey "${terminfo[kcud1]}" history-substring-search-down
# bind UP and DOWN arrow keys (compatibility fallback)
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down