Add ZSH_AUTOSUGGEST_MATCH_PREV_MAX_CMDS option

With this the until now hard-coded value of 200 can be configured.
This commit is contained in:
druckdev 2021-07-14 23:57:23 +02:00
commit 7a0c87155b
No known key found for this signature in database
GPG key ID: CA6B3A516FAC2555
4 changed files with 17 additions and 4 deletions

View file

@ -58,6 +58,9 @@ For more info, read the Character Highlighting section of the zsh manual: `man z
For example, setting `ZSH_AUTOSUGGEST_STRATEGY=(history completion)` will first try to find a suggestion from your history, but, if it can't find a match, will find a suggestion from the completion engine.
#### When `ZSH_AUTOSUGGEST_STRATEGY` contains `match_prev_cmd`:
- `ZSH_AUTOSUGGEST_MATCH_PREV_MAX_CMDS`: The previous command is only looked at of a number of the most recent commands that match the current prefix. This sets the maximum number of commands to consider. Set it to -1 to always use all matches.
### Widget Mapping