Closed dmfay closed 2 years ago
What happens for folks who have it currently set to true
or false
? Make sure false
maps to 0
and true
to 1
?
What happens for folks who have it currently set to true or false? Make sure false maps to 0 and true to 1?
Any string value resolves to 0, disabling fuzzy searching until an int factor >0 is supplied. It is a little disruptive, but I'm also thinking of people who might otherwise not realize there are improvements -- and, hopefully, getting a few more interested parties from the issue to help test and improve the weighting before this lands.
I think it'd be better to be backward compatible and make 'true' map to '1' (or whatever numerical score you think has the best experience).
Also, please run rustfmt. Thanks!
I had the idea of including match start position in the weighting, so earlier as well as shorter matches are preferred. That makes a big difference already, but a MCFLY_FUZZY
of 2 still improves on 1.
Thanks!
Released in 0.5.10.
Experimenting based on discussion in #183
No extra weight:
No elaboration needed, it's not great.
Shorter match weighted x2:
Immediate improvement, with actual ssh commands at the top and most other sorting fairly reasonable. The
./target/relea[se/mcfly search]
match is ahead ofvi [sql.zsh]
, but I've definitely run the former several times in this directory (and the latter never).Shorter match weighted x10:
There's a point of diminishing returns here and 10 may be past it;
./target/relea[se/mcfly search]
is pushed way down, and even higher values (x20, x50) don't look much different.