history-substring-search.plugin.zsh 452 B

123456789101112131415
  1. 0=${(%):-%N}
  2. source ${0:A:h}/history-substring-search.zsh
  3. # Bind terminal-specific up and down keys
  4. if [[ -n "$terminfo[kcuu1]" ]]; then
  5. bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up
  6. bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up
  7. fi
  8. if [[ -n "$terminfo[kcud1]" ]]; then
  9. bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down
  10. bindkey -M viins "$terminfo[kcud1]" history-substring-search-down
  11. fi