config(zsh): add zsh-history-substring-search
parent
24fbd413a8
commit
6e183ad83e
|
@ -22,11 +22,22 @@ export LESS="-RF -i -K -s -x2 --wordwrap"
|
||||||
if [[ -f /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]]; then
|
if [[ -f /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]]; then
|
||||||
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
|
||||||
# https://github.com/zsh-users/zsh-autosuggestions#suggestion-strategy
|
|
||||||
typeset -g ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
typeset -g ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
||||||
typeset -g ZSH_AUTOSUGGEST_HISTORY_IGNORE=$HISTORY_IGNORE
|
typeset -g ZSH_AUTOSUGGEST_HISTORY_IGNORE=$HISTORY_IGNORE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# https://unix.stackexchange.com/q/621606
|
||||||
|
# https://github.com/zsh-users/zsh-history-substring-search
|
||||||
|
if [[ -f /opt/homebrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh ]]; then
|
||||||
|
source /opt/homebrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||||
|
|
||||||
|
bindkey '^[[A' history-substring-search-up
|
||||||
|
bindkey '^[[B' history-substring-search-down
|
||||||
|
|
||||||
|
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=''
|
||||||
|
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=''
|
||||||
|
fi
|
||||||
|
|
||||||
# git
|
# git
|
||||||
# https://stackoverflow.com/a/43747486
|
# https://stackoverflow.com/a/43747486
|
||||||
export GIT_COMPLETION_CHECKOUT_NO_GUESS=1
|
export GIT_COMPLETION_CHECKOUT_NO_GUESS=1
|
||||||
|
|
Loading…
Reference in New Issue