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

Re: Completion function for bitkeeper?

Danek Duvall wrote:
> 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.

Sorry, I should have been more clear. What I mean is actually in the
_arguments action itself not within a function called as part of the
action. Looking at the documentation, it isn't as clear on this as it
should be. It doesn't help that in the rearrangement of the
documentation, the expl mention has become separated from the
`{eval-string}' action form and a little from the initial space feature
(have a look at 4.0 documentation).

Basically, it is intended so you can do things like this:

  '-a:desc: _foo -x -y -z "$expl[@]" a b c'
  '-b:desc:{compadd "$expl[@]" one two three}'

(the initial space before _foo prevents _arguments from automatically
putting explanation options after `_foo'.)

It is not intended so that with a specification like:
_sccs_files can then look in expl.

Any ideas on how to make the documentation clearer on this? Thanks for
raising the issue.

> 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!

That is only for passing compadd options to _arguments. I don't
personally like it much though.

How's that bitkeeper function doing these days by the way? Is it at a
stage we could include with zsh? Does it conflict with _sccs?


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