1234567891011121314151617 |
- #
- # Enable searching history with substrings
- #
- # Source script
- source ${0:h}/external/zsh-history-substring-search.zsh || return 1
- # Binding ^[[A/^[[B manually mean up/down works with history-substring-search both before and after zle-line-init
- bindkey '^[[A' history-substring-search-up
- bindkey '^[[B' history-substring-search-down
- # Bind up and down keys
- zmodload -F zsh/terminfo +p:terminfo
- if [[ -n ${terminfo[kcuu1]} && -n ${terminfo[kcud1]} ]]; then
- bindkey ${terminfo[kcuu1]} history-substring-search-up
- bindkey ${terminfo[kcud1]} history-substring-search-down
- fi
|