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

Make an exact-match that is case-sensitive #111

Open
simonduchen opened this issue Nov 7, 2022 · 1 comment
Open

Make an exact-match that is case-sensitive #111

simonduchen opened this issue Nov 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@simonduchen
Copy link

When searching for an exact match using single-quote before the search string, with extended search mode enabled:
I would expect the result to be exact as, non-fuzzy and case-sensitive. But the matches are only non-fuzzy.
For example:
const fzf = new Fzf(['Hello', 'hello', 'HeLLo'], {match: extendedMatch});
const result = fzf.find("'hello").map(({item}) => item); // result: ['Hello', 'hello', 'heLLo']

But I would expect:
const result = fzf.find("'hello").map(({item}) => item); // result: ['hello']

There is a similar request for the fzf-cli: junegunn/fzf#2613

My proposal is the same as in the ticket mentioned above, either make a another function for a true exact-match and rename the current one to non-fuzzy match, or make the current exact-match case-sensitive.

@simonduchen simonduchen added the enhancement New feature or request label Nov 7, 2022
@ajitid
Copy link
Owner

ajitid commented Nov 8, 2022

Heya, I agree that we have a use-case here.

This library closely follows the core logic of fzf-cli. And to avoid the risk of breaking backwards compatibility, I'll wait for fzf-cli to get an implementation first. I have subscribed to the ticket you mentioned, and rest assured, this library would get an update as well.

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

2 participants