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

Re: Is this a bug or I'm completely lost?



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