Re: Bug in syntax checking causes unintended running of a function

2016-04-20 Thread David Maas
Fair enough. On Wed, Apr 20, 2016 at 8:44 AM, Greg Wooledge wrote: > On Wed, Apr 20, 2016 at 08:30:48AM -0700, David Maas wrote: > > So if you really want my opinion, the shell should be aware that it's in > a > > function. > > Agreed, unless it's really ha

Re: Bug in syntax checking causes unintended running of a function

2016-04-20 Thread David Maas
Incidentally, is it possible that somehow )) is simply interpreted the same as } in this situation? It would also explain the perceived behavior. On Wed, Apr 20, 2016 at 12:55 AM, konsolebox wrote: > On Tue, Apr 19, 2016 at 10:45 PM, David Maas wrote: > > Running the echo and other co

Re: Bug in syntax checking causes unintended running of a function

2016-04-20 Thread David Maas
function with a scope) to work. Anyway if you guys don't want to fix it, I doubt that many people would notice, but it is definitely a bug! Thank you for discussing it, David On Wed, Apr 20, 2016 at 12:55 AM, konsolebox wrote: > On Tue, Apr 19, 2016 at 10:45 PM, David Maas wrote: >

Bug in syntax checking causes unintended running of a function

2016-04-19 Thread David Maas
The behavior of bash in this instance could cause a serious problem. - David On Mon, Apr 18, 2016 at 8:38 PM, konsolebox > wrote: > On Tue, Apr 19, 2016 at 3:52 AM, David Maas > wrote: > > Hi! I found a bug in bash, I've checked versions 4.1 (centos 6.7), 4.2 > > (centos

Bug in syntax checking causes unintended running of a function

2016-04-18 Thread David Maas
Hi! I found a bug in bash, I've checked versions 4.1 (centos 6.7), 4.2 (centos 7.2), and 4.3.30 (from the ftp site). The bug is that if you do a double parenthesis math thing with the wrong syntax, the script runs the function during what I assume is syntax checking. Demonstration script is attache