You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first match does contain a contiguous pool at the start of the filename, so it's not unreasonable that it came first. And the second has a split prefix match for po*/o*/l*. But the rest are pretty spread-out arbitrary single-letter substring matches.
Given the path similarity, I expected my target to be at the top of the list, followed by activerecord/lib/active_record/connection_adapters/statement_pool.rb (shorter, but no abstract).
cp and spoo are sufficient to get those two files, respectively, to the top while using their first character.
I know different people/projects use underscores (and similar characters) in different ways, and sometimes treating it as a full word separator equal to / could give equally surprising results in the opposite direction. Perhaps the list of separators could be configurable?
❤️ 💚 💙 💛 💜
Thanks so much for cpsm! Its match quality has completely changed my mind about the usefulness of fuzzy finders -- and it's only because of that "always knows what I mean" awesomeness that I'm opening this issue to report where it's tripped me up.
The text was updated successfully, but these errors were encountered:
_ is actually recognized as a word separator, which is why cp and spoo work. The problem is that cpsm isn't very good at matching queries that don't at least match at the beginning of the basename, because in the current implementation word matching is a bit of hack to prevent matching from being exponential-time in the length of the query. I have some ideas on how to improve this, but it'll probably involve another matcher redesign.
Starting from
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
, I typedpool
.I wanted to find
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
, but the top results were:The first match does contain a contiguous
pool
at the start of the filename, so it's not unreasonable that it came first. And the second has a split prefix match forpo*/o*/l*
. But the rest are pretty spread-out arbitrary single-letter substring matches.Given the path similarity, I expected my target to be at the top of the list, followed by
activerecord/lib/active_record/connection_adapters/statement_pool.rb
(shorter, but noabstract
).cp
andspoo
are sufficient to get those two files, respectively, to the top while using their first character.I know different people/projects use underscores (and similar characters) in different ways, and sometimes treating it as a full word separator equal to
/
could give equally surprising results in the opposite direction. Perhaps the list of separators could be configurable?❤️ 💚 💙 💛 💜
Thanks so much for cpsm! Its match quality has completely changed my mind about the usefulness of fuzzy finders -- and it's only because of that "always knows what I mean" awesomeness that I'm opening this issue to report where it's tripped me up.
The text was updated successfully, but these errors were encountered: