zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: The "set" utility outputs binary data
Date: Fri, 04 Dec 2015 14:29:00 +0000	[thread overview]
Message-ID: <20151204142900.0c035c6a@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20151203142533.5aae65f6@pwslap01u.europe.root.pri>

On Thu, 3 Dec 2015 14:25:33 +0000
Peter Stephenson <p.stephenson@samsung.com> wrote:
> On Thu, 3 Dec 2015 15:05:58 +0100
> Vincent Lefevre <vincent@vinc17.net> wrote:
> > I think that by default, "set" should quote non-printable characters
> > (including invalid byte sequences, I assume).
> 
> It already does some sort of quoting, in fact.  It's probably just a
> historical artifact that it doesn't do the latest and greatest sort.

It looks like the strategy would be be to upgrade quotedzputs() to
interact better with nicezputs() and nicechar().  The code that's not
there at the moment is to pick the right sort of quotes, and you only
know that after the event at the moment, so the interface to those two
needs expanding.

I'd propose not bothering to do this in the case where multibyte mode
isn't available (i.e is not even compiled in).  It's not useful enough
and wouldn't get much testing.

pws


  reply	other threads:[~2015-12-04 14:29 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 [this message]
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)
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=20151204142900.0c035c6a@pwslap01u.europe.root.pri \
    --to=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).