Feature request: disambiguating subdirectories
nzbart opened this issue · 3 comments
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.
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.
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)
It might be useful to have the separator be optional, e.g.
z pl/cont
as @nzbart suggested, but also as simplyz 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.