Skip to content

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

@simonduchen

Description

@simonduchen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions