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

Re: PATCH: zstyle to control completion of functions/parameters beginning with underscore



>>>>> On March 10, 2011 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> Try this ... if it works,

It does, as does

+    "functions:shell function:compadd -k 'functions$ffilt'}"

which I like a little better.

> produce a patch for the others

_parameters doesn't need it, as it is directly producing the matches
as arguments to compadd.

_functions seems to be working, it is using _wanted which is passing
the arguments to compadd separately.

I really wonder if this shouldn't be considered a quoting bug
somewhere between _alternative and the actual call to compadd?

Hmm, maybe the line:

        eval "action=( $action )"

in _alternative?  Maybe it should be

        eval "action=( "${=action}" )"

(haven't actually tested that)?

Or is it intentional that _alternatives, because it is taking a list
of compadd arguments as a single string, must necessarily have proper
quoting applied?  I.e. we actually want the full eval semantics?

Greg



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