Open anachrome opened 9 years ago
I was wondering if anyone had a fix for this behavior, using z modules
to try and go to a modules
folder almost always takes me to modules/app1
or modules/app2
, depending on which one I was in recently. I saw @rupa merged another request recently, I wonder if he has any thoughts on this one?
yeah, i should really think about merging this. at the very least, it gets rid of the code i hate most. definitely some "i have this problem and this fixes it and doesn't make anything else worse" comments help :)
I’ll put it on my computer and test it for a week or two, I use z a handful of times a day so I think it would be a decent indicator of real world use. Thank you!
Edit: There have been significant changes since this was submitted, I'll try to get all the changes into a branch that works first. Then I'll test it out
normal z matching behavior, especially with respect to the
common()
function, is a little odd:In fact, if an unrelated path matching
/aaa/
is in z's database, andaaa/bbb
is of higher frecency thanaaa
, there is no way to jump toaaa
without also jumping deeper intoaaa/bbb
.This patch changes the matching behavior so z will only jump to a deeper directory if it is explicitly matched - e.g.,
z aaa
will never jump below the directory matchingaaa
, which I find to be slightly more intuitive.