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

Line continuation between $ and { [was: The big kre zsh bug report]



Op 21-12-18 om 08:53 schreef Bart Schaefer:
On Thu, Dec 20, 2018 at 2:48 PM Martijn Dekker <martijn@xxxxxxxx> wrote:
Robert Elz wrote:
[...] my guess is
that the ${ with a \newline between the $ and { is not working as it should.
Confirmed. A bit more experimenting shows that it breaks between '$' and
'{' and nowhere else. Very unlikely for line continuation to be used
there in real-life scripts, but still a bug.
Not going to argue with that one.  I suspect it's because the parser
is treating "{" as beginning a brace expansion (e.g., {a,b,c}) at that
point and so encodes it differently.

Sure enough, when turning on brace expansion:

$ zsh --emulate sh -o braceexpand -c 'foo=bar; echo $\
{foo}'
bar

it works correctly all of a sudden.

- M.



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