Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match multiple previous commands & more configuration #621

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

druckdev
Copy link

@druckdev druckdev commented Jul 14, 2021

  • Add ZSH_AUTOSUGGEST_MATCH_PREV_MAX_CMDS configuration option: With this the until now hard-coded value of 200 can be configured.
  • Add ZSH_AUTOSUGGEST_MATCH_NUM_PREV_CMDS configuration option: With this the number of preceding commands that have to match when using the match_prev_cmd strategy can be set (and can be multiple now).

With this the until now hard-coded value of 200 can be configured.
With this the number of preceding commands that have to match when using
the `match_prev_cmd` strategy can be set (and can be multiple now).
@druckdev druckdev changed the base branch from master to develop July 14, 2021 23:54
@druckdev
Copy link
Author

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
Copy link
Author

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

druckdev added a commit to druckdev/dotfiles that referenced this pull request Jul 22, 2021
See zsh-users/zsh-autosuggestions#621

Set experimental values to the new configuration options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant