bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd bash behaviour with time:


From: Piotr Grzybowski
Subject: Re: Odd bash behaviour with time:
Date: Thu, 6 Nov 2014 00:50:40 +0100

On Tue, Nov 4, 2014 at 1:24 AM, Ángel González <angel@16bits.net> wrote:
>
> There are more syntax errors equivalent to the "time;" case: [..]

 I completely agree with Linda :)

> time | foo

 this one can be got rid of by the following (it will make time | time
| time | time; possible, very much like having spam-with-spam-on-spam.
since there is no flags |= $1; in this rule, the timings will not kick
in. really meaningless:)):

diff --git a/parse.y b/parse.y
index 815db98..dc345cd 100644
--- a/parse.y
+++ b/parse.y
@@ -1208,6 +1208,10 @@ pipeline_command: pipeline
                            $2->flags |= $1;
                          $$ = $2;
                        }
+ | timespec '|' pipeline_command
+   {
+    $$ = $3;
+   }
        |       timespec list_terminator
                        {
                          ELEMENT x;


cheers,
pg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]