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 02:08:37 +0100
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> On 2007-12-11 11:20:38 +0000, Peter Stephenson wrote:
> > I've uploaded new development versions of 4.3.4 and 4.2.6 to
> > ftp://ftp.zsh.org/pub/development .  Unless something major turns up I
> > will release 4.3.5 and 4.2.7 some time around the weekend.
> Another bug:

which is that in the traditional "test" command (not [[, which is parsed
  ( ! -e )
should be treated as
  ( ! -n -e )
which is horrible, but it's a horror we're already trying to work around so
presumably we ought to go the extra mile.

   -e )
tests for a file ')', right?  That's what GNU (standalone) test does.  That
means we need to know whether we're in parentheses, so we need an extra
global variable.

Furthermore, this change makes
  ( ! -e ) )
an error:  the first ) has to be parsed as a "real" closing parenthesis
otherwise the rule either becomes inconsistent or requires too much
lookahead.  I checked with GNU test and this is indeed what it does (it
reports an error), and since the shell's "test" is basically there just for
compatibility I suppose this is OK.  However, it doesn't thrill me.

  ( -e ) )
is parsed by GNU test as -e ")" in parentheses.  This is rather inconsistent
of it.  If you're happy that this is an error as the other one is, then I
have a working patch.  Otherwise we're a bit stuck.

What I don't have is a set of tests:  our test suite doesn't include many
tests for test or [.  This is a real nuisance, since it's quite likely this
changes something.  So I'll need to write something first (I presume no one
else is going to).

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