Re: [PATCH] printing multiple heredocs in list

2023-06-30 Thread Grisha Levit
On Fri, Jun 30, 2023, 16:02 Chet Ramey 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

Re: [PATCH] printing multiple heredocs in list

2023-06-30 Thread Chet Ramey
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

[PATCH] printing multiple heredocs in list

2023-06-29 Thread Grisha Levit
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: fun() { cat second); - PRINT_DEFERRED_HEREDOCS (""); + if (was_heredoc) + PRINT_DEFERRED_HER