On Sun, Dec 5, 2021 at 5:29 PM Zach Riggle <zachriggle@xxxxxxxxx> wrote:
_wanted -V popular-directories expl 'popular directories' \
compadd -Q -a dirs
#-------------------------- COMPLETION ENHANCEMENT ---------------------------
This completion works well, though I would like to know how to get the
completion to not do word-separated completion and upon e.g.
$ foobarbaz bi<tab>
... to not add a space, but instead allow further specification e.g.,
You should add the -f option to compadd, so that it knows the results
are file names (which includes directories). I suspect you also do
not really need/want the -Q option.
You should also NOT include the trailing slash in the values returned
from zshz-cd-completion. Either -f will cause compadd to figure that
out, or you should be passing the options -S "/" and -q to compadd (if
the strings returned by zshz-cd-completion might not refer to existing
directories).