From: "Andrej Borsenkow" <borsenkow.msk@sni.de>
To: "Peter Stephenson" <pws@ibmth.df.unipi.it>,
"Zsh hackers list" <zsh-workers@sunsite.auc.dk>
Subject: RE: PATCH: pws-19: minor syntactic innovation
Date: Tue, 1 Jun 1999 16:52:30 +0400 [thread overview]
Message-ID: <001a01beac2d$9c1ec2c0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <9906010821.AA38598@ibmth.df.unipi.it>
>
> This isn't due to the change I made, it simply showed up because of that.
> The cause is dquote_parse(), which is doing brace-counting; in
> other words,
> it rejects the second `"' as the end of the quoted string because it
> detected the ${. So this behaviour seems to be entirely deliberate.
>
I beg your pardon, I was just too eager. Looking more closely in Single Unix
reveals:
The dollar-sign retains its special meaning introducing parameter expansion
(see Parameter Expansion ), a form of command substitution (see Command
Substitution ), and arithmetic expansion (see Arithmetic Expansion ). The
input characters within the quoted string that are also enclosed between
"$(" and the matching "(" will not be affected by the double-quotes, but
rather define that command whose output replaces the $(...) when the word is
expanded. The tokenising rules in Token Recognition are applied recursively
to find the matching ")". Within the string of characters from an enclosed
${ to the matching "}", an even number of unescaped double-quotes or
single-quotes, if any, must occur. A preceding backslash character must be
used to escape a literal "{" or "}". The rule in Parameter Expansion will be
used to determine the matching "}".
In other words, Zsh (and bash) both behave "POSIXLY-correct" at least in the
respect to correct expressions.
/andrej
next prev parent reply other threads:[~1999-06-01 12:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-23 15:15 Peter Stephenson
1999-05-29 8:31 ` Bart Schaefer
1999-05-31 22:41 ` Bart Schaefer
1999-06-01 6:23 ` Andrej Borsenkow
1999-06-01 8:21 ` Peter Stephenson
1999-06-01 12:52 ` Andrej Borsenkow [this message]
1999-06-01 9:56 ` PATCH: pws-19: document " Peter Stephenson
1999-06-01 17:44 ` Bart Schaefer
1999-06-02 8:03 ` Peter Stephenson
1999-06-02 8:44 ` sh compatibility " Andrej Borsenkow
1999-06-02 8:30 ` Peter Stephenson
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='001a01beac2d$9c1ec2c0$21c9ca95@mow.siemens.ru' \
--to=borsenkow.msk@sni.de \
--cc=pws@ibmth.df.unipi.it \
--cc=zsh-workers@sunsite.auc.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).