When a backslash is present inside [here-doc](https://tldp.org/LDP/abs/html/here-docs.html) it is not preserved in the output(input). See the difference with bash below: ``` gosh $ cat << EOF > test \" test > EOF test " test ``` ``` bash bash-3.2$ cat << EOF > test \" test > EOF test \" test ``` Relates to: - https://github.com/go-task/task/issues/1538
Activity
mvdan commentedon Apr 28, 2024
Thanks, this looks like a bug in the parser. I didn't know that heredocs treat backslashes unlike any other part of the language.
expand: don't unescape characters inside here-documents
expand: heredocs unescape \$, \\, and \`, just not \"
chore(deps): update module mvdan.cc/sh/v3/cmd/shfmt to v3.12.0 (hetzn…