From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Test version before zsh 5.4
Date: Thu, 3 Aug 2017 21:33:35 +0100 [thread overview]
Message-ID: <20170803213335.522e1be6@ntlworld.com> (raw)
In-Reply-To: <1606b3b3-c462-3616-0bb0-c711d8194941@inlv.org>
On Thu, 3 Aug 2017 19:57:04 +0200
Martijn Dekker <martijn@inlv.org> wrote:
> Op 03-08-17 om 18:00 schreef Martijn Dekker:
> > I found a problem with the shell's generation of C-style shell-quoted
> > strings ($'...').
> >
> > % testvar=$'one\\two\n'
> > breedzicht% set|grep ^testvar
> > testvar=$'one\two\n'
> >
> > The backslash is not escaped properly.
>
> A simple fix is attached.
Thanks, here's a test.
pws
diff --git a/Test/A03quoting.ztst b/Test/A03quoting.ztst
index da3ce35..be9ca66 100644
--- a/Test/A03quoting.ztst
+++ b/Test/A03quoting.ztst
@@ -78,3 +78,8 @@
() { print $# } '' "" $''
0:$'' should not be elided, in common with other empty quotes
>3
+
+ foo=$'one\\two\n\'buckle\'\tmy\\shoe\n'
+ print -r ${(q+)foo}
+0:Extended minimal quoting of quotes and backslashes
+>$'one\\two\n\'buckle\'\tmy\\shoe\n'
prev parent reply other threads:[~2017-08-03 20:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170731204904epcas4p290cb92dadba8d78676093dd6f8411c9f@epcas4p2.samsung.com>
[not found] ` <20170731214745.6f81a0f4@ntlworld.com>
2017-08-03 11:07 ` Peter Stephenson
2017-08-03 16:00 ` Martijn Dekker
2017-08-03 17:57 ` Martijn Dekker
2017-08-03 20:33 ` Peter Stephenson [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=20170803213335.522e1be6@ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.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.
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).