mcfly
mcfly copied to clipboard
Implement fuzzy search
It would be great if results contained not only commands exactly matching the input, but allow for imperfections.
For starters ignoring special characters ([^a-zA-Z0-9]
).
Another round could implement real fuzziness (chars in incorrect order, typos made by pressing neighboring keys, ...).
I think that's a great idea. Search is in sqlite, so whatever we do needs to be implemented there. Are you interested in working on it?
Sure, I could give it a try. From a quick scan of a code it seems I should just compute the fuzzy strings and add them as OR LIKE to https://github.com/cantino/mcfly/blob/master/src/history/history.rs#L230 Could you confirm that please?
Yes, that's correct.
I suggest looking at skim
Right now you can put a %
in your search to do semi-fuzzy searching, but skim looks very nice. I'd be open to contributions that use it.