Open druckdev opened 3 years ago
Wanted to create the PR already to get some feedback if what I am doing here is wanted. I would look into writing some tests if that is the case.
I also wanted to ask what you think of an additional option that results in the suggestion being the command that has the most matching previous commands as fallback instead of exact. For the case when there is no matching command with the number of matching previous commands, as this could be the case on higher values for ZSH_AUTOSUGGEST_MATCH_NUM_PREV_CMDS
.
Oh, and also: What do you think of the names of the two configuration options? I am a bit unsure if those are good names but have no better idea...
ZSH_AUTOSUGGEST_MATCH_PREV_MAX_CMDS
configuration option: With this the until now hard-coded value of 200 can be configured.ZSH_AUTOSUGGEST_MATCH_NUM_PREV_CMDS
configuration option: With this the number of preceding commands that have to match when using thematch_prev_cmd
strategy can be set (and can be multiple now).