Re: Newlines resulting from alias expansion are ignored by here-document processing

2023-12-05 Thread alex xmb sw ratchev
On Tue, Dec 5, 2023, 17:22 Chet Ramey wrote: > On 11/30/23 3:45 AM, gldrk wrote: > > $ cat test > > alias 'foo=cat < > hello' > > foo > > world > > EOF > > $ sh test > > world > > test: line 5: hello: command not found > > > > My reading of the upcoming POSIX revision > > (https://www.austingroup

Re: Newlines resulting from alias expansion are ignored by here-document processing

2023-12-05 Thread Chet Ramey
On 11/30/23 3:45 AM, gldrk wrote: $ cat test alias 'foo=cat

Re: Newlines resulting from alias expansion are ignored by here-document processing

2023-11-30 Thread gldrk
This patch appears to solve the issue. As far as I can tell, this routine is only used for here-documents. diff --git a/parse.y b/parse.y index 8fd24a1c..4d361af7 100644 --- a/parse.y +++ b/parse.y @@ -2083,6 +2083,8 @@ read_a_line (remove_quoted_newline) static char *line_buffer = (char *)N

Newlines resulting from alias expansion are ignored by here-document processing

2023-11-30 Thread gldrk
$ cat test alias 'foo=cat