Bug#741402: [bash] Shell functions definitions may require parentheses despite function keyword

2014-03-13 Thread Linda Walsh
Filipus Klutiero wrote: Hi Linda, On 2014-03-12 23:23, Linda Walsh wrote: Filipus Klutiero wrote: $ function bar () (echo x) --- Hmm... You are right. Are you in posix mode by chance? I tried your example in my bash and it works. bash --version GNU bash, version 4.3.0(1)-rc1

Bug#741402: [bash] Shell functions definitions may require parentheses despite function keyword

2014-03-13 Thread Filipus Klutiero
On 2014-03-13 08:26, Linda Walsh wrote: Filipus Klutiero wrote: Hi Linda, On 2014-03-12 23:23, Linda Walsh wrote: Filipus Klutiero wrote: $ function bar () (echo x) --- Hmm... You are right. Are you in posix mode by chance? No (assuming that's not the case by default). I tried

Bug#741402: [bash] Shell functions definitions may require parentheses despite function keyword

2014-03-13 Thread Dan Douglas
On Wednesday, March 12, 2014 01:57:19 AM Filipus Klutiero wrote: The following definition should therefore be valid: $ function bar (echo x) ...but it's not: bash: syntax error near unexpected token `echo' However, an identical function can be defined with the following definition:

Bug#741402: [bash] Shell functions definitions may require parentheses despite function keyword

2014-03-12 Thread Filipus Klutiero
Package: bash Version: 4.3-2 Severity: minor X-Debbugs-Cc: bug-b...@gnu.org According to the manual, either the function keyword or parentheses should be sufficient to define a function: Shell Function Definitions A shell function is an object that is called like a simple command and

Bug#741402: [bash] Shell functions definitions may require parentheses despite function keyword

2014-03-12 Thread Chet Ramey
On 3/12/14 1:57 AM, Filipus Klutiero wrote: Package: bash Version: 4.3-2 Severity: minor X-Debbugs-Cc: bug-b...@gnu.org According to the manual, either the function keyword or parentheses should be sufficient to define a function: Shell Function Definitions A shell function is an

Bug#741402: [bash] Shell functions definitions may require parentheses despite function keyword

2014-03-12 Thread Filipus Klutiero
Hi Linda, On 2014-03-12 23:23, Linda Walsh wrote: Filipus Klutiero wrote: $ function bar () (echo x) --- That's not a compound command. They start with { and end with } you must have spaces between the braces and anything else, and the } must be after a LF or a semicolon (list) is the

Bug#741402: [bash] Shell functions definitions may require parentheses despite function keyword

2014-03-12 Thread Linda Walsh
Filipus Klutiero wrote: $ function bar () (echo x) --- That's not a compound command. They start with { and end with } you must have spaces between the braces and anything else, and the } must be after a LF or a semicolon I suspect this is an upstream bug. --- System information. ---