Re: Unexpected parse error in function definition involing grouping braces and redirections

2015-06-16 Thread Andreas Schwab
Michael Le Barbier Grünewald writes: > Nevertheless, when evaluating the second snippet > >failwith() >{ > 1>&2 { >printf 'Failure: ' >printf "$@" >printf '\n' > } > exit 1 >} > > bash does not report the synta

Re: Unexpected parse error in function definition involing grouping braces and redirections

2015-06-16 Thread Andreas Schwab
Greg Wooledge writes: > On Tue, Jun 16, 2015 at 01:56:31PM +0200, Michael Le Barbier Grünewald wrote: >> 1>&2 { >> printf "$@" >> printf '\n' >> } > > Redirections may appear anywhere in a simple command, but may only appear > at the END of a compound c

Re: Unexpected parse error in function definition involing grouping braces and redirections

2015-06-16 Thread Michael Le Barbier Grünewald
Hi Greg, thank you for your answer! > On 16 Jun 2015, at 14:58, Greg Wooledge wrote: > > On Tue, Jun 16, 2015 at 01:56:31PM +0200, Michael Le Barbier Grünewald wrote: >> 1>&2 { >>printf "$@" >>printf '\n' >> } > > Redirections may appear anywhere in a

Re: Unexpected parse error in function definition involing grouping braces and redirections

2015-06-16 Thread Greg Wooledge
On Tue, Jun 16, 2015 at 01:56:31PM +0200, Michael Le Barbier Grünewald wrote: > 1>&2 { > printf "$@" > printf '\n' > } Redirections may appear anywhere in a simple command, but may only appear at the END of a compound command. Brace grouping is a compou

Unexpected parse error in function definition involing grouping braces and redirections

2015-06-16 Thread Michael Le Barbier Grünewald
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: darwin14.3.0 Compiler: /usr/bin/clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='d\ arwin14.3.0' -DCONF_MACHTYPE='x86_64-apple-darwin14.3.0' -DCONF_VENDOR='apple' \ -DLOCALEDIR