gum
gum copied to clipboard
[Feature Request] - Filter - Filter by whole words only option
For instance
echo "The quick brown fox" | gum filter
Will show up if I type hioo
in the filter.
I'd prefer an option where it will only show up quick
or k bro
Are you saying that it searches the entire string for those characters instead of a singular word?
Yeah it will highlight each letter.
I just found this project but they use sahilm/fuzzy for the fuzzy searching so maybe the problem is with them. Again I just found this project so I could be wrong.
Agreed this would be useful. In my testing with gum filter
I have say:
> Filter...
• Clear
/Users/mathomp4/Models/GrITAS-MERRA2_V2_SLES12-fromCVS/GrITAS
/Users/mathomp4/Models/mat-qvi-1_0_r3-SLES12-fromCVS/QVI
/Users/mathomp4/Models/GEOSgcm-GNU-TestMOM6AppUpdate/GEOSgcm
/Users/mathomp4/Models/GEOSgcm-Intel-TestMOM6AppUpdate/GEOSgcm
/Users/mathomp4/Models/GEOSldas-NAG-OLD/GEOSldas
/Users/mathomp4/Models/GEOSldas-NAG/GEOSldas
/Users/mathomp4/Models/GrITAS-MERRA2_V2_SLES12-fromCVS/GrITAS
/Users/mathomp4/Models/mat-qvi-1_0_r3-SLES12-fromCVS/QVI
/Users/mathomp4/Models/MAPL3-GNU/MAPL
/Users/mathomp4/Models/MAPL-GNU12-ZstdBaselib/MAPL
/Users/mathomp4/Models/MAPL-GNU/MAPL
/Users/mathomp4/Models/MAPL-Intel/MAPL
/Users/mathomp4/Models/MAPL-NAG-7.1_7113/MAPL
/Users/mathomp4/Models/MAPL-mepopackage/MAPL
and I'd like to drill down to the MAPL
ones. Unfortunately, when I try that I get pretty much everything still there since all it matches letters early on that don't "mean" as much:

Note that filtering on mapl
or MAPL
doesn't help.
I just found this project but they use sahilm/fuzzy for the fuzzy searching so maybe the problem is with them. Again I just found this project so I could be wrong.
It looks like @isacikgoz has made some improvements on the original fuzzy. Maybe he'd know if whole-word searching is possible?
Since I like this project and it's part of the Hacktoberfest I was trying to have a look at this.
I have a working POC, can I assign this to me and open a PR?
Hey @enrichman for sure you can open a PR!
Thanks @maaslalani, I've found a couple of issues with my initial approach, but I've fixed them.