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

Re: PATCH: (2): Bug#255788: $'' does not work after <<<



On Mon, 28 Jun 2004, Peter Stephenson wrote:

> " unchanged; ` now does the same thing as double quotes, which means \\
> gets turned into \, etc.; backquotes don't do command substitution ---
> they never did, but they wouldn't have been stripped properly.

Er, stripped?  They shouldn't get stripped, at least not when used as the 
marker for a here-doc.  My example from previous mail showed that:

[schaefer]$ cat <<`echo foo`
> bar
> foo
> echo foo
> `echo foo`
bar
foo
echo foo
[schaefer]$ 

(We could argue that bash is wrong in this case, but ...)

(I admit I haven't tried this second patch yet, so sorry if I've jumped to
the wrong conclusion here.)

> Here strings: [...] This should be more consistent, doing zsh's standard 
> forced single-word substitution (make sure arrays don't turn it into 
> multiple words, etc.).  I still don't see any reason why this would be 
> the wrong thing to do.

This is fine as long as it doesn't change the behavior of here-documents.
Sorry if I inadvertently implied otherwise at any point.



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