Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Test version before zsh 5.4
- X-seq: zsh-workers 41485
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Test version before zsh 5.4
- Date: Thu, 3 Aug 2017 21:33:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1501792416; bh=S3tYJqy8MQnGdfl2H0b3pjVgQEP7+SylKnKyi5TIP7I=; h=Date:From:To:Subject:In-Reply-To:References; b=fRQSo/jtP0BJH6ldcbt+WhFcHKBcXOO7HYvQxK99mg+0B8RbHDNOvRkp+B/MQ/Gia mhoMaRoQV2cJule6eprSiYVQuNCmeJf6QZ0NOBfwuUt7jitNRRI3et6NQaYyGUZ+LL 7CKxuPPizE39wVNMuG0feS4MJdlMLhHQODCl3eW2yl3NSGzVT4OjVh2HjV+YeRPK7B uO1vMj+gZNd52Py5XKUBX/5apWABfyrJPKslG2EN1CxI9w9YqNE3+St3Dk8FA9KeuP pqG/qqh14kS6FvWQKa/4PrFc3+AqBosd50rGEAKjgl0w6H8fxXoFq6q84odkVMkNRc jnn3ToHsljPeg==
- In-reply-to: <1606b3b3-c462-3616-0bb0-c711d8194941@inlv.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170731214745.6f81a0f4@ntlworld.com> <96245589-7b8a-6532-3c9b-85304b0064be@inlv.org> <1606b3b3-c462-3616-0bb0-c711d8194941@inlv.org>
On Thu, 3 Aug 2017 19:57:04 +0200
Martijn Dekker <martijn@xxxxxxxx> 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'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author