init.zsh 578 B

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