On Tue, May 17, 2016 at 04:05:57PM +0000, Christos Zoulas wrote: > In article <17323.1463479...@andromeda.noi.kre.to>, > Robert Elz <k...@munnari.oz.au> wrote: > >The posix shell standard does not allow empty sub-shells, or command > >groups. That is, both > > ( ) > >and > > { } > >(even if you write the latter as "{ ; }" though it turns out the ';' > >there is not actually required, as it, or a \n, usually is before '}') > >are both syntax errors. > > [stuff deleted] > > >ps: various other places, beyond the one from PR bin/48489 (which is > >fixed already I believe) where empty "commands" were permitted will also > >get corrected by this fix. > > I think we should probably have "strict posix mode" for this (via an > environment variable or command line switch?) ... > Allowing relaxed syntax like this is convenient.
For braces, yes - that is at least semantically sensible. For a subshell, I'd say not so much. Also, accepting invalid syntax that other shells reject eventually bites us. -- David A. Holland dholl...@netbsd.org