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. That way you shouldn't need to print any deferred
here-documents in make_command_string().

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to