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

${(z)param} and here-document syntax



I suggested this over in a thread on zsh-users:

  zshaddhistory() { print -sr "${(z)1%%$'\n'}"; return 1 }

However, when $1 contains a here-document, this produces e.g.

cat << EOF ; blather to the history ; bother to the whole story ; EOF

I'm not precisely sure what it *should* do, except perhaps to treat the
entire here-document as a single parse token and retain the embedded
newlines.



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