Closed GopherJ closed 3 years ago
z test post
should work here. Writing it as test-post
makes zoxide look for a single substring, which is why you don't see a match.
We have considered fuzzy matching in the past, but I'm not entirely sold on it. I've found that non-fuzzy matching has three main advantages:
@ajeetdsouza Thanks it worked, I agree that jumping to not wanted directory is bad... That's why I switched from autojump-rs to zoxide because things are more predictable like you've said.
However on the same time maybe there is still a small effort to do on zoxide side to make it smarter, like removing special charaters of input
and target directory
etc.
removing special characters of
input
That again makes things unpredictable. Why add a special character to the query that you don't want to match against? A space is easier to type anyway.
I think the fuzzy matching you're looking for here somewhat resembles the Smith-Waterman algorithm (looks for similar sequences in the input and output), which is what fzf uses. zoxide works out of the box with fzf using the zi
command.
While you can use zi
everywhere to cd into directories, it usually takes way more characters for fzf to figure out the correct directory than it takes zoxide. So I'd still suggest something like zi test
followed by typing post
into the interactive prompt.
I find that I cannot type:
test-post
to jump to a directory calledtest-box-postfix
, I have to typepostfix
to be able to jump in, but considering that I don't have any other directories containspost
, it looks strange to me thatzoxide
cannot figured it out. is it possible to have bigger fault tolerance? Let's say even fuzzer