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: disambiguating subdirectories #54

Open
nzbart opened this issue Sep 4, 2021 · 3 comments
Open

Feature request: disambiguating subdirectories #54

nzbart opened this issue Sep 4, 2021 · 3 comments

Comments

@nzbart
Copy link

nzbart commented Sep 4, 2021

Let me know if this already exists, but I couldn't see it in your examples.

It'd be great if we could specify fragments that match parts of the path.

Hypothetical database:

  • /some/directory/with/useful/content
  • /some/place/with/useful/content

Currently, I can enter z cont<tab> and be presented with a list to choose from. It'd be great if I could enter z pl/cont and have the pl match place, and cont match the content directory, avoiding the need to scroll around in a list.

@agkozak
Copy link
Owner

agkozak commented Sep 4, 2021

Not a bad idea at all. I’ve got cd working for me like that in ZSH, so why not ZSH-z?

The completion function is still very simple. I was going to do a little work on that next. Let’s leave this issue open, and I’ll make sure to address it in time.

Thank you for helping to make this plugin better.

@zachriggle
Copy link

This would indeed be neat! It might be useful to have the separator be optional, e.g. z pl/cont as @nzbart suggested, but also as simply z pl cont (with spaces)

@agkozak
Copy link
Owner

agkozak commented Nov 8, 2021

It might be useful to have the separator be optional, e.g. z pl/cont as @nzbart suggested, but also as simply z pl cont

Doesn't that already work? Give it a try. That's a behavior inherited from rupa/z; a space is replace with * and then expanded when you hit tab. The one problem is that whatever came before the space is still displayed as a separate thing on the command line; it doesn't affect the outcome, but it's an ugly bug. The completion system is pretty unhappy about space not being a separator of arguments. Eventually I'll have to do some real zle voodoo to make that go away.

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