mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-15 15:42:31 +01:00
Support fallback strategies by setting array in config
This commit is contained in:
parent
949c374195
commit
bcbdad83e9
10 changed files with 100 additions and 55 deletions
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
#--------------------------------------------------------------------#
|
||||
# Default Suggestion Strategy #
|
||||
#--------------------------------------------------------------------#
|
||||
# Will provide suggestions from your history. If no matches are found
|
||||
# in history, will provide a suggestion from the completion engine.
|
||||
#
|
||||
|
||||
_zsh_autosuggest_strategy_default() {
|
||||
typeset -g suggestion
|
||||
|
||||
_zsh_autosuggest_strategy_history "$1"
|
||||
|
||||
if [[ -z "$suggestion" ]]; then
|
||||
_zsh_autosuggest_strategy_completion "$1"
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue