-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disambiguation on near equal values #6
Comments
First off: get well soon! Burnout is not to be underestimated, I hope you can give yourself some rest and find your energy again. The problem you're describing cannot be perfectly fixed. It's a fuzzy matcher, the results will never match your expectation 100% of the time, but we can try to get close. Scotty searches as follows:
The fst part of this seems to be working fine: whenever I get a result I didn't expect, the result I was expecting is part of set returned by fst. Your example is slightly pathological, in the sense that the results are equal except for a I like your idea of excluding the current directory from the search results. This makes a lot of sense: if you're invoking scotty your intent is to move directories. That should not be too hard to implement. Other ideas are to have a function that only searches subfolders of the current directory. |
In v0.3.0 the current directory will be excluded from the search results, which should improve your experience. I'm planning on experimenting with different scoring algorithms to see if I can get this to behave better still. |
(I understand this is not a simple issue, but maybe discussing it would provide some ideas on how to solve it.)
I have a couple of directories that are almost the same, but with some differences, for example:
worker
worker-v3
While using Scotty with
s v3
will get me in the expected directory,s work
will jump to the last of those that I got in, with no change to make it to the other (e.g., if the last I got intoworker-v3
,s work
will jump back toworker-v3
, no matter how many times I call Scotty).One thing that I can think to solve this is to add a parameter called
--exclude
in the Scotty command, and pass the current directory in it (e.g., if I'm inworker
, callings work
will actually callscotty search work -- exclude "worker"
).While this could work for two directories, if I had a
worker-v2
in there, Scotty would keep jumping between some two of them and never get to the third. For this,--exclude
could move the directory to the bottom of the list, whilesearch
will get the first one; this will make the directories "rotate" through all the possibilities.Honestly, I'm not sure if any of those is actually implementable, as I didn't read Scotty code yet (long hours in the office, a non-healed burnout).
If this isn't implementable, feel free to close the issue.
The text was updated successfully, but these errors were encountered: