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

allow config fullmatch for 'which' #1290

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

allow config fullmatch for 'which' #1290

wants to merge 3 commits into from

Conversation

fuwt
Copy link

@fuwt fuwt commented Jul 13, 2024

when I call

ya.which { cands = {
  { on = {"w","k"}, desc = "/xxx/works"},
}}

I might want to get a return value only after pressing "w" and "k", rather than when pressing "d". Because the of only on match, so I added an 'emit_unique' option to configure this behavior.

@sxyazi
Copy link
Owner

sxyazi commented Jul 13, 2024

Thanks for the PR!

How about not auto-submitting when silent=true? I think it only makes sense when silent is set, because if the user can see the remaining candidates, they should have some expectations.

@fuwt
Copy link
Author

fuwt commented Jul 14, 2024

Thanks for the PR!

How about not auto-submitting when silent=true? I think it only makes sense when silent is set, because if the user can see the remaining candidates, they should have some expectations.

actually, I think it should never auto-submit if user is not complete input. user can easyly see the whole cand and input it quickly, but it is difficult to distinguish whether options starting with some letter are unique

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.

2 participants