ZSH_AUTOSUGGEST_STRATEGY
is an array that specifies how suggestions should be generated. The strategies in the array are tried successively until a suggestion is found. There are currently three built-in strategies to choose from:
history
: Chooses the most recent match from history.completion
: Chooses a suggestion based on what tab-completion would suggest. (requireszpty
module)match_prev_cmd
: Likehistory
, but chooses the most recent match whose preceding history item matches the most recently executed command. Note that this strategy won't work as expected with ZSH options that don't preserve the history order such asHIST_IGNORE_ALL_DUPS
orHIST_EXPIRE_DUPS_FIRST
.