From: "Nikolay Aleksandrovich Pavlov (ZyX)" <kp-pav@yandex.ru>
To: Peter Stephenson <p.stephenson@samsung.com>,
"zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: The "set" utility outputs binary data
Date: Mon, 07 Dec 2015 21:29:29 +0300 [thread overview]
Message-ID: <537551449512969@web11o.yandex.ru> (raw)
In-Reply-To: <20151207102449.5993404a@pwslap01u.europe.root.pri>
07.12.2015, 13:26, "Peter Stephenson" <p.stephenson@samsung.com>:
> On Sun, 06 Dec 2015 15:08:44 -0800
> Bart Schaefer <schaefer@brasslantern.com> wrote:
>> On Dec 4, 9:56pm, Peter Stephenson wrote:
>> }
>> } This seems to be going the right way; let me know of any oddities or
>> } unwanted side effects. Note a few "nice" representations have changed
>> } to fit $'..' conventions.
>>
>> I'll withhold judgment on whether I like this, though I must say I do
>> prefer "^C" to "\C-c".
>
> If this is important enough, we can arrange two versions of nicechar /
> wcs_nicechar. The quickest change would be expanding the functions under
> different names to take a flag when passed from mb_niceformat(),
> together with a shim layer for other cases.
>
> (You can't seriously be complaining that "typeset -m IFS" now outputs
>
> IFS=$' \t\n\C-@'
>
> instead of raw binary, can you?)
Can’t this code be somehow combined with ${(q)} rather then ${(V)}? I would really prefer if ${(q)"$(echo $'\C-c')} resulted in $'\C-c' and not in $'\003'.
>
>> In any case though, this has borked two of the test scripts:
>
> Not sure what I can have been testing.
>
> pws
>
> diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
> index a3c5d71..2b46e06 100644
> --- a/Test/D04parameter.ztst
> +++ b/Test/D04parameter.ztst
> @@ -396,9 +396,9 @@
> >Instead Here I Am Stuck By The Computer
>
> foo=$'\x7f\x00'
> - print ${(V)foo}
> + print -r -- ${(V)foo}
> 0:${(V)...}
> ->^?^@
> +>\C-?\C-@
>
> foo='playing '\''stupid'\'' "games" \w\i\t\h $quoting.'
> print -r ${(q)foo}
> diff --git a/Test/V09datetime.ztst b/Test/V09datetime.ztst
> index 63ff4ee..831421d 100644
> --- a/Test/V09datetime.ztst
> +++ b/Test/V09datetime.ztst
> @@ -69,6 +69,6 @@
> >090
> >1
>
> - print ${(V)"$(strftime $'%Y\0%m\0%d' 100000000)"}
> + print -r -- ${(V)"$(strftime $'%Y\0%m\0%d' 100000000)"}
> 0:Embedded nulls
> ->1973^@03^@03
> +>1973\C-@03\C-@03
next prev parent reply other threads:[~2015-12-07 18:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 14:05 Vincent Lefevre
2015-12-03 14:25 ` Peter Stephenson
2015-12-04 14:29 ` Peter Stephenson
2015-12-04 21:56 ` Peter Stephenson
2015-12-06 23:08 ` Bart Schaefer
2015-12-07 10:24 ` Peter Stephenson
2015-12-07 18:13 ` Bart Schaefer
2015-12-07 21:39 ` Peter Stephenson
2015-12-07 18:29 ` Nikolay Aleksandrovich Pavlov (ZyX) [this message]
2015-12-03 14:46 ` Stephane Chazelas
2015-12-03 23:43 ` Daniel Shahaf
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=537551449512969@web11o.yandex.ru \
--to=kp-pav@yandex.ru \
--cc=p.stephenson@samsung.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).