[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'time' not recognized as reserved when first word after 'if'
From: |
Dan Douglas |
Subject: |
Re: 'time' not recognized as reserved when first word after 'if' |
Date: |
Tue, 10 Jun 2014 11:54:36 -0500 |
On Tue, Jun 10, 2014 at 8:39 AM, Dale R. Worley <worley@alum.mit.edu> wrote:
>> From: Dan Douglas <ormaaj@gmail.com>
>>
>> On Mon, Jun 9, 2014 at 7:51 PM, Dale R. Worley <worley@alum.mit.edu> wrote:
>> > But if I add braces around the condition, 'time' is recognized:
>>
>> That's not too surprising. That "!" is unaffected is. "if ! ! time :;
>> then ..." is an equivalent but working pipeline. "if time { :; };"
>> should also be valid but time isn't recognized.
>
> It might not be surprising, but it's incorrect according to the manual
> page.
>
> That "! !" works at all is astonishing, because the syntax in the
> manual page seems to show that only one "!" is allowed:
Chet explained the actual workings pretty well if you're interested:
https://lists.gnu.org/archive/html/bug-bash/2012-10/msg00062.html
The manual is incomplete but I think the real behavior makes sense.
The "if time" case you noticed is still pretty clearly buggy.