charmbracelet / gum

A tool for glamorous shell scripts 🎀
MIT License
18.09k stars 340 forks source link

Extended search syntax like fzf? #688

Open jesseleite opened 1 week ago

jesseleite commented 1 week ago

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:

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 commented 1 week ago

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