Skip to content
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

Go directly to exact match instead of subdirectory #296

Open
madprops opened this issue Feb 26, 2021 · 5 comments
Open

Go directly to exact match instead of subdirectory #296

madprops opened this issue Feb 26, 2021 · 5 comments

Comments

@madprops
Copy link

I find the following to not work as I would expect:

z pics1
/home/user/Downloads/pics/pics1

z Downloads
/home/user/Downloads/pics/pics1

In the second command I intended to go to the Downloads directory.
I personally think it should have gone to Downloads since it's specifically using that name directly, instead of going to a subdirectory.

@ghost
Copy link

ghost commented Mar 25, 2021

Yes, that would be helpful

@msudgh
Copy link

msudgh commented Mar 30, 2021

🔥 Very useful improvement on directory matching logic. I have the same problem and it's better a flag indicates if users need to match the exact directory if matched in the ranked list.

@delanym
Copy link

delanym commented Apr 13, 2021

I guess I have the same issue:

/git/tepe $ cd ../tep
/git/tep $ cd ../tepe
/git/tepe $ z tep
/git/tepe $

Isn't this the whole point of the program?

@Gevrai
Copy link

Gevrai commented Apr 29, 2021

The Readme even says the following, which I would assume means that it should match the shortest /home/user/Downloads/ in your example.

   Common:
       When multiple directories match all queries, and they all have a common
       prefix, z will cd to the shortest matching directory, without regard to
       priority.  This has been in effect, if  undocumented,  for  quite  some
       time, but should probably be configurable or reconsidered.

@madprops
Copy link
Author

I'm working on a separate z implementation that fixes this issue
https://github.com/madprops/ezkl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants