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

Feature Request: Go to next best match? #208

Closed
peey opened this issue Jul 24, 2017 · 4 comments
Closed

Feature Request: Go to next best match? #208

peey opened this issue Jul 24, 2017 · 4 comments

Comments

@peey
Copy link

peey commented Jul 24, 2017

Let's say z foo lands you in a directory a-foo but you wanted to go to b-foo, would it be useful to implement a feature z -n which could mean "go to the next best match"?

And then whenever z -n is used, it could also "teach" z to swap the rankings of the previous match with this match.

Would it be useful to have or am I using z wrong?

@rupa
Copy link
Owner

rupa commented Jul 25, 2017

yeah i'm not interested in implementing something like this. it makes you think too much imo. knowing that the match i want is the second one is too much brain, and then what if it becomes the 3rd.

z works best with the idea that one tends tp distinguish similar but different file paths in the mind already with a bit of shorthand ... if you use ~/Documents/foo, ~/Desktop/foo, ~/Pictures/foo all of the time, you're maybe already thinking doc foo des foo pic foo ...

along the same lines it was a very conscious decision not to have results in a list, that you could pick from.

@peey
Copy link
Author

peey commented Jul 25, 2017

I agree with what you said, but my use case is different. If I use all of ~/Documents/foo, ~/Desktop/foo, ~/Pictures/foo very frequently, then it's useful to to think like doc foo, des foo, and pic foo

But what happened with me was I had recently created all of ~/Documents/foo, ~/Desktop/foo, ~/Pictures/foo but I am only concerned with ~/Desktop/foo from now on and not the others

So when I did z foo I wanted to land in ~/Desktop/foo but landed in ~/Documents/foo instead.

So I wanted to do something like z -n once to "teach" z to always go to ~/Dekstop/foo(which might be one of the next results) and not to the current result

But I think I am not using this correctly. Would you say that in this situation I should first cd around in the newly created directories and let z learn before I start using it?

@ericbn
Copy link
Contributor

ericbn commented Oct 10, 2017

But what happened with me was I had recently created all of ~/Documents/foo, ~/Desktop/foo, ~/Pictures/foo but I am only concerned with ~/Desktop/foo from now on and not the others

@peey, this is when the -x option comes to play. You do z -x foo until you land at ~/Desktop/foo.

@peey
Copy link
Author

peey commented Oct 10, 2017

That's a good solution. Thanks @ericbn

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

3 participants