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

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



Bart Schaefer wrote:
> It certainly appears that this is the intentional behavior of compadd -k, 
> 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.  
> The code very explicitly stops searching as soon as a partial match has 
> been found; the only reason you get all of them in your first example is 
> that there are no partial matches.

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?

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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