Fuzzy matching?
qazip opened this issue ยท 12 comments
It would be nice if rlaunch supported fuzzy maching.
For example, I have a .desktop entry called "no-ads". Typing "no ads" should return "no-ads"...
Good idea.
I'll try to look into this soon
f5ea52e implemented.
Awesome! Just one thing:
Typing "qb" returns 2 matches, in this order:
- Qt qDbusViewer;
- qBittorrent;
Any idea why "qBittorrent" is not the first match?
It appears that the algorithm is not actually case insensitive, I'll make a quick fix for it
I don't think that's it actually. "qb", "QB", "qB" and "Qb" all return the same thing, in the same order and that is the order from my previous message..
However if the target strings become all lowercase, entering "qb" returns "qbittorrent" first
Edit: check 06b180a out
@PonasKovas, it works as intended now, thank you!
You should bump the version though. rlaunch --version
still gives 1.3.9.
Oh yeah, thanks, I keep forgetting to do that
I'm personally not really happy with how it works now. It seems that the algorithm is not giving enough significance to whether the target string starts with the pattern. If I type disco
, obviously discord
should be the first suggestions, but for some reason things like pppoe-discovery
and plasma-discover-update
get higher (or equal) scores.
Works perfectly for me.
ffx gives firefox
qb gives qbittorrent first
noads gives no-ads
That's great, it seems to be working for my cases too.
Feel free to re-open if you encounter any more bugs or have any more questions.