`jc` does not limit results to subdirectories (via `match_fuzzy`)
Created by: blueyed
With jc foo
in /home/daniel/.autojump
, /tmp/t/C:\Users/foo
was returned.
This appears to be caused by match_fuzzy
, which uses only the last needle for fuzzy matching.
I see two problems here:
-
jc
should trigger a mode, where entries are filtered based on the path prefix (pwd
) explicitly, i.e. find results and apply a path based filter. -
match_fuzzy
should not work on the last needle only.
I could imagine looping over all needles in match_fuzzy
.
This would change the documented behavior though, since Entry(path="/moo/foo/baz", weight=10),
would not get matched anymore for needles=['foo', 'bar']
.
I have started writing some tests for it, but would like to get some feedback before carrying on.