From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Cc: 255788-forwarded@bugs.debian.org
Subject: Re: Bug#255788: $'' does not work after <<<
Date: Sun, 27 Jun 2004 11:37:24 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.60.0406271129290.19831@toltec.zanshin.com> (raw)
In-Reply-To: <20040627174550.94612865D@pwstephenson.fsnet.co.uk>
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.
next prev parent reply other threads:[~2004-06-27 18:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040623023305.GA15259@localhost>
2004-06-23 17:55 ` Clint Adams
2004-06-23 18:56 ` Bart Schaefer
2004-06-25 9:55 ` Peter Stephenson
2004-06-26 18:34 ` Bart Schaefer
2004-06-27 0:07 ` Peter Stephenson
2004-06-27 17:04 ` Bart Schaefer
2004-06-27 17:45 ` Peter Stephenson
2004-06-27 18:37 ` Bart Schaefer [this message]
2004-06-27 19:44 ` Peter Stephenson
2004-06-28 11:39 ` PATCH: (2): " Peter Stephenson
2004-06-28 15:14 ` Bart Schaefer
2004-06-28 15:29 ` Peter Stephenson
2004-06-28 15:39 ` Peter Stephenson
2004-06-28 17:26 ` Bart Schaefer
2004-06-30 10:00 ` Peter Stephenson
2004-06-30 15:58 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.60.0406271129290.19831@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=255788-forwarded@bugs.debian.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).