From: Martijn Dekker <martijn@inlv.org>
To: dash@vger.kernel.org
Subject: Re: [BUG] quoted substring parameter expansion ignores single-quotes in the arg
Date: Wed, 25 Oct 2017 12:08:42 +0200 [thread overview]
Message-ID: <a2539560-b359-e465-e427-9b85cdd8a545@inlv.org> (raw)
In-Reply-To: <20171021121343.GA29646@stack.nl>
Op 21-10-17 om 14:13 schreef Jilles Tjoelker:
[...]
> I think it is sufficiently clear that various special
> characters are active in ${param#word}, whether the outer substitution
> is within double-quotes or not.
Yes -- this came up on austin-group-l some time ago as well.
https://www.mail-archive.com/austin-group-l@opengroup.org/msg00197.html
> Although zsh is a good interactive shell, it does not follow
> POSIX as closely; not even in sh or ksh emulation mode.
I think that may have changed. Try the latest version. Over the last
year or two, many POSIX compliance bugs have been fixed. I believe the
latest version is about as compliant as bash or dash.
Zsh does still accept the wrong "${param#'}" expansion like dash does,
but handling non-compliant input is more like an extension than actual
non-compliance. Zsh acts correctly on "${param#\'}", like dash. It also
acts correctly on "${param#'foo'}", *unlike* dash.
- M.
prev parent reply other threads:[~2017-10-25 10:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 3:41 [BUG] quoted substring parameter expansion ignores single-quotes in the arg G.raud
2017-10-19 10:41 ` [NO-BUG] " G.raud
2017-10-21 12:13 ` [BUG] " Jilles Tjoelker
2017-10-25 10:08 ` Martijn Dekker [this message]
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=a2539560-b359-e465-e427-9b85cdd8a545@inlv.org \
--to=martijn@inlv.org \
--cc=dash@vger.kernel.org \
/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.
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).