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

Re: Completion function for bitkeeper?

On Tue, Nov 11, 2003 at 09:22:57AM +0100, Oliver Kiddle wrote:

> Searching for expl in zshcompsys, it is only used in examples. The one
> exception is in the context of _arguments actions where it isn't just a
> convention (_arguments can't use positional parameters for actions).

And as an action in _arguments is exactly how I'm using the _sccsfiles
function.  See my posting from May 23 that includes the _bk script.

I'm not sure what you mean by your parenthetical statement.  My action
certainly does have positional parameters passed to it, some of which
are the ones I specify as its arguments in my call to _arguments, some
of which are passed in without my telling them to be.

> I certainly can't see anywhere where it suggests that you can expect
> it to be set by a calling function.

Except by _arguments.

> The two entirely different sets of information system isn't ideal but
> the positional parameters are the most convenient place for passing
> information around.

Then why in $expl in the single case of _arguments?

> For now completion functions should avoid certain compadd options for
> passing other information. zparseopts tends to make it easy enough to
> follow this. If you really want lots of options, follow _arguments and
> have a `-O array' option for passing compadd options.

Hm.  I just saw that.  So in addition to the documented methods of using
$expl in an action of _arguments to get compadd args and using some of
the positional parameters, there's also the suggested method of passing
them in through -O?  What a wealth!

> compadd arguments aren't passed in $expl.

Except from _arguments (not to belabor the point or anything ;-).


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