]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/history-substring-search/history-substring-search.plugin.zsh
63f0bdd4200375023003b66b8581bf4f241c0ee3
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / history-substring-search / history-substring-search.plugin.zsh
1 # Handle $0 according to the standard:
2 # https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
3 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
4 0="${${(M)0:#/*}:-$PWD/$0}"
5
6 source ${0:A:h}/history-substring-search.zsh
7
8
9 # Bind terminal-specific up and down keys
10
11 if [[ -n "$terminfo[kcuu1]" ]]; then
12   bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up
13   bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up
14 fi
15 if [[ -n "$terminfo[kcud1]" ]]; then
16   bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down
17   bindkey -M viins "$terminfo[kcud1]" history-substring-search-down
18 fi
19