Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is this a bug or I'm completely lost?
- X-seq: zsh-workers 20547
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Is this a bug or I'm completely lost?
- Date: Thu, 4 Nov 2004 20:35:45 -0800 (PST)
- In-reply-to: <13119.1099592066@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20041104115359.GA23778@DervishD> <Pine.LNX.4.61.0411040841090.5131@xxxxxxxxxxxxxxxxxx> <13119.1099592066@xxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
On Thu, 4 Nov 2004, Peter Stephenson wrote:
> > based on a look at the code. If you specify multiple arrays in a
> > single compadd, they're assumed to indicate a preference ordering
> > (e.g. nameddirs xor userdirs) whereas if you use separate compadds
> > they're cumulative.
>
> It's hard to believe it's a useful feature. grep suggests it's not
> used. I can't see what you'd use it for. Doesnt' ${array:-$array2}, or
> something similar do it more clearly?
Er, no, ${array:-$array2} would only work if $#array == 0. You'd need
something more baroque, such as
compadd -A found -k array && compadd -a found
(( $#found == 0 || $#found == $#array )) && compadd -k array2
The patch I sent does NOT implement the equivalent of the above.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author