Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#255788: $'' does not work after <<<
- X-seq: zsh-workers 20110
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#255788: $'' does not work after <<<
- Date: Sun, 27 Jun 2004 11:37:24 -0700 (PDT)
- Cc: 255788-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <20040627174550.94612865D@xxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20040627174550.94612865D@xxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
On Sun, 27 Jun 2004, Peter Stephenson wrote:
> ... and I was talking about the end marker: it seemed to be the
> conclusion of what you were saying that in:
>
> cat <<$foo
> ...
> cat <<$'a\tb'
> ...
> cat <<"$(echo hello)"
>
> the \t in the middle case was exanded, but the $ in the other two
> weren't.
The conclusion seems to be that $'...' is treated as a form of quoting,
not a form of expansion, whereas `...` is treated as a form of expansion
rather than a form of quoting; quoting applies, but expansion does not.
Viz:
[schaefer]$ cat <<`echo foo`
> bar
> foo
> echo foo
> `echo foo`
bar
foo
echo foo
[schaefer]$
> I haven't even thought about changing anything to do with the
> contents.
Had my wires crossed again, it seems.
> I don't think that's our problem. We consistently use singsub() for
> cases like this and I can't see why we shouldn't here.
I'm not sure whether you mean "that's [not] our problem" in the sense of
"that's not what we're doing wrong" or in the sense of "it's not incumbent
upon us to deal with that."
However, if indeed $'...' is meant as a form of quoting, then singsub()
may be the wrong place for it to be handled -- other forms of quoting are
applied earlier in the parse.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author