Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.9 (macOS 15.8.2 Apple build): heredoc/here-string on a non-first pipeline member concatenates upstream pipe output into stdin instead of overriding the pipe



Stephane Chazelas wrote on Sat, 31 Oct 2026 13:50 +00:00:
> 2026-10-31 19:51:11 +0800, 孤客:
> [...]
>> > Minimal repro:
>> > 
>> >     % printf 'PIPE-CONTENT' | cat <<'EOF'
>> >     HEREDOC-CONTENT
>> >     EOF
>> >     PIPE-CONTENTHEREDOC-CONTENT      # zsh 5.9 actual (concatenated)
>> > 
>> >     # expected / bash & /bin/sh actual:
>> >     HEREDOC-CONTENT
> [...]
>
> That's as documented.

Also, zsh doesn't promise to correctly interpret arbitrary bash scripts:
see https://zsh.org/workers/53892 and the references there.




Messages sorted by: Reverse Date, Date, Thread, Author