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

Extended search syntax like fzf? #688

Open
jesseleite opened this issue Oct 16, 2024 · 3 comments
Open

Extended search syntax like fzf? #688

jesseleite opened this issue Oct 16, 2024 · 3 comments
Labels
blocked blocked by some other issue and/or pr cmd/filter enhancement New feature or request

Comments

@jesseleite
Copy link

Is your feature request related to a problem? Please describe.

In fzf, one thing I do quite a bit is narrow down the search either by:

  • Providing multiple fuzzy terms in my query (separated by spaces, ie. foo bar)
  • Prefixing search term(s) with quote to ensure fzf searches non-fuzzy exact match of that term (ie. 'model)

Describe the solution you'd like

I think fzf's extended search syntax is really elegant. Maybe gum filter could allow for multiple search terms, and at the very least a quote ' prefix for non-fuzzy exact match? 🙏

Describe alternatives you've considered

I realize --no-fuzzy already exists, but the benefit to the quote ' prefix is that the user can turn a search into a non-fuzzy search on-the-fly, if they happen to be searching for a word that they know they don't want fuzzy for. The --no-fuzzy flag is awesome, but requires that decision to be made by the running script instead of the end user.

Additional context

This is a good summary of fzf's "extended search" syntax
CleanShot 2024-10-15 at 20 16 54
(Source: https://github.com/junegunn/fzf#search-syntax)

@jesseleite
Copy link
Author

PS. Thank you all for your awesome open source work 🥰

@caarlos0 caarlos0 added enhancement New feature or request cmd/filter labels Nov 18, 2024
@caarlos0
Copy link
Member

the library we use currently doesn't support it, unfortunately.

see also #701 that might be related

@caarlos0 caarlos0 added the blocked blocked by some other issue and/or pr label Dec 13, 2024
@meowgorithm
Copy link
Member

Just chiming in here: we're not opposed to supporting this if a contributor was willing to implement it, however the filtering algorithm should be improved first, so this is a bit of a long play.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked blocked by some other issue and/or pr cmd/filter enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants