Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Multipart autocomplete, zstyle, and cd




On 06/12/2021 04:47, Bart Schaefer wrote:
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).

Ah the dreaded 'optionally' unwanted trailing space when I want to do two stage completion.
Will see if this advice can help me

zzapper





Messages sorted by: Reverse Date, Date, Thread, Author