zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: The "set" utility outputs binary data
Date: Thu, 3 Dec 2015 15:05:58 +0100	[thread overview]
Message-ID: <20151203140558.GA17469@zira.vinc17.org> (raw)

The "set" utility outputs binary data (probably due to escape
sequences for coloring and so on in some parameters such as
prompts):

zira:~> set | grep ZSH
Binary file (standard input) matches

Though I could use the non-standard -a grep option, this is annoying.
I think that by default, "set" should quote non-printable characters
(including invalid byte sequences, I assume). I don't think that this
is even forbidden by POSIX, which already requires the shell to quote
some characters so that the output is "suitable for reinput to the
shell".

This is also important when the output is on a terminal.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


             reply	other threads:[~2015-12-03 14:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 14:05 Vincent Lefevre [this message]
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)
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=20151203140558.GA17469@zira.vinc17.org \
    --to=vincent@vinc17.net \
    --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).