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

Re: Completion function for bitkeeper?

On Fri, Nov 07, 2003 at 08:17:45PM +0100, Oliver Kiddle wrote:

> Looking inside expl is not a good idea as the array name expl is
> purely a convention.

I agree that if it's merely a convention that I shouldn't use it.
However, the zshcompsys man page explicitly documents it, suggesting
that it's safe to use.  If it's not, perhaps removing it from the
documentation is the right thing to do.

> Try using zparseopts to find and remove that -e option instead:
>   zparseopts -D -E e=eopt
>   [[ -n $eopt ]] && sfile="SCCS/p."

That works, thanks.

Still, this whole thing feels like a fragile interface.  Two entirely
different sets of information are being passed to the function on the
commandline, which at the very least means that there's a potential for
flag collision (what happens if _arguments decides to pass in -e for
compadd purposes?), never mind the parsing difficulties.

It seems that using some other method for passing in compadd arguments
would be better ... such as using a well-known parameter name.  :)

I still maintain that passing in the compadd arguments both on the
commandline and in $expl is a bug, as it's duplicative, redundant,
repetitive, and redundant.


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