decision: in heredoc, we will not ignore \newline

This commit is contained in:
Khaïs COLIN 2025-02-11 14:19:19 +01:00
parent 0637a637b9
commit d72613c29f
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo

View file

@ -369,8 +369,7 @@ or filename expansion is performed on word.
If any part of word is quoted, the delimiter is the result of quote removal on If any part of word is quoted, the delimiter is the result of quote removal on
word, and the lines in the here-document are not expanded. If word is unquoted, word, and the lines in the here-document are not expanded. If word is unquoted,
all lines of the here-document are subjected to parameter expansion, and the all lines of the here-document are subjected to parameter expansion.
character sequence \\newline is ignored.
This is the correct behaviour for quoting and parameter expansion: This is the correct behaviour for quoting and parameter expansion:
```shell ```shell
@ -404,9 +403,7 @@ bash-5.2$ cat << "$USER"
> $USER > $USER
``` ```
TODO: do we need to ignore \\newline? subject says \\ is not required.. Subject says \\ is not required, so this behaviour we will not implement:
If we have to implement it, this is the correct behaviour:
```shell ```shell
bash-5.2$ cat << EOF bash-5.2$ cat << EOF
> hello \ > hello \