bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] printing multiple heredocs in list


From: Grisha Levit
Subject: Re: [PATCH] printing multiple heredocs in list
Date: Fri, 30 Jun 2023 16:12:46 -0400

On Fri, Jun 30, 2023, 16:02 Chet Ramey <chet.ramey@case.edu> wrote:

> On 6/29/23 4:01 AM, Grisha Levit wrote:
> > If there are multiple commands in a row that each require printing the
> > connector prior to the heredoc body, the connector ends up in the wrong
> > place for commands after the first:
>
> OK. The parser builds lists (connections) left-side heavy. What do you
> think of replacing the test for was_heredoc in your patch with
> (printing_connection == 1), so if we're called recursively to print a
> second connection on the left side (Connector->first), we print the here-
> document body after our caller has been able to add the connector in
> the right place.


Oh yeah that seems like a much better solution.

That way you shouldn't need to print any deferred
> here-documents in make_command_string().
>

Great, this was the part that made me think something was wrong with my
approach.

>


reply via email to

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