zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.81k stars 1.85k forks source link

Match multiple previous commands & more configuration #621

Open druckdev opened 3 years ago

druckdev commented 3 years ago
druckdev commented 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.

druckdev commented 3 years ago

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...