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

Command fuzzy matching #16

Open
bengry opened this issue Feb 9, 2022 · 3 comments
Open

Command fuzzy matching #16

bengry opened this issue Feb 9, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@bengry
Copy link

bengry commented Feb 9, 2022

Allow commands to be fuzzy-matched when searching (with something like https://github.com/farzher/fuzzysort, but not necessarily it).

Potentially also allow typos. e.g. for command named Open allow searching using Opne (within a threshold)

@ssleptsov ssleptsov added the enhancement New feature or request label Feb 10, 2022
@ssleptsov
Copy link
Owner

Thanks for suggestion! Yea, sounds as a good feature.

I will add this functionality, but need to check if there are other smaller libs or implement it inside.
Because I don't want to grow dependencies a lot or at least want to keep size small.

So, if you or anyone have other suggestions for libs/repos, drop a link here.
Cheers!

@bengry
Copy link
Author

bengry commented Feb 10, 2022

@ssleptsov as a potential workaround, as to not have this built in - you could expose a matcher function (passed in a similar way to the commands I guess? I'm not super familiar with Web Components, but I assume you can't pass non-seriazable things using attributes) and let the consumer optionally provide it, having them bear the bundle size increase.

Default would be the current regex matching that's done.

Having said that, I think since you may also want a different order for results, that might have to be exposed via the same (?) api as well.

@wobsoriano
Copy link
Contributor

Kbar uses this internally https://github.com/superhuman/command-score

Screen Shot 2022-05-08 at 1 11 36 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants