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

Re: 4.3.4-dev-4 and 4.2.6-dev-2 available



On Wed, 12 Dec 2007 13:07:03 +0000
Peter Stephenson <pws@xxxxxxx> wrote:
> Unfortunately,
>   ( -e ) )
> is parsed by GNU test as -e ")" in parentheses.

Aha, four arguments is a special case whereas five isn't:

4 arguments:
     * If $1 is '!', negate the three-argument test of $2, $3, and $4.
     * [XSI] [Option Start] If $1 is '(' and $4 is ')', perform the
       two-argument test of $2 and $3. [Option End]
     * Otherwise, the results are unspecified.

>4 arguments:
    The results are unspecified.

I don't think we've ever claimed to implement the X/Open System Interfaces
Extension, but if it's taking away uncertainty it's good.  I need to look at
these rules; they shouldn't be too hard to add.

The rule for three arguments is similar: we look explicitly for first and
last argument "(" and ")" and don't need to be clever about parentheses.
Beyond that, I'm not sure which is better, but I'm also not sure I care.

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



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