Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion function for bitkeeper?
- X-seq: zsh-users 6761
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh users <zsh-users@xxxxxxxxxx>
- Subject: Re: Completion function for bitkeeper?
- Date: Tue, 11 Nov 2003 17:13:53 +0100
- In-reply-to: <8193.1068564272@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <8193.1068564272@xxxxxxx>
Peter wrote:
> Hmm... isn't the problem that the $expl set at this point and passed
> down to _bar ultimately ends up getting passed to compadd (maybe
> indirectly), while _bar may add its own options? I've seen this sort of
It never should be passed to compadd. _bar or some other function would
have to use $expl without declaring it local and setting it itself.
If you've seen problems, there must be a missing local declaration for
expl somewhere.
If you look inside _all_labels and _description, you will see that any
existing value in expl (assuming that is what is passed as the name
parameter) is thrown away with the new value assigned to it. So the
only way that an old $expl can get used is by some other completion
function using "$expl[@]" without declaring expl local.
expl is only ever intended to be used temporarily. It is not part of
any mechanism by which information is passed down through the
completion system.
> thing when trying to sort out the sorting, i.e. the -J and -V options to
> compadd. Often one of them's already lurking in $expl at the point
> where I want to propagate my choice of option down through the system.
Are you sure it isn't lurking in the positional parameters.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author