zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: PATCH: parse from even deeper in hell
Date: Fri, 20 Feb 2015 09:54:06 +0000	[thread overview]
Message-ID: <20150220095406.4e3ebb9d@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <54E6B5C3.1000104@eastlink.ca>

On Thu, 19 Feb 2015 20:19:15 -0800
Ray Andrews <rayandrews@eastlink.ca> wrote:
> Would some kind soul explain (if an explanation is possible) why the 
> original string is not just saved verbatim? (Or maybe after history 
> expansion is handled).  Why would a line in history not just be what it is?

That's a good question, and while we're probably stuck with the current
behaviour --- history files need to be shared between different
versions of the shell --- it would be good to know why.

The reason will probably be one of

- It just got forgotten about.  It works within any version of the shell
because the string is well-defined; it's only when we add a token,
as I did yesterday, that we get incompatibilities.  So no one noticed
it wasn't really pukka.

- It's so we can get embedded zero bytes.  Zsh attempts to treat these
internally as ordinary characters, rather than string terminators.
However, they're ordinary characters in file text, too, so it's not
clear this is a good reason.  Further, we already escape some characters
in an ad hoc fashion, notably newlines, so there's no reason we
shouldn't do that here, too.

The mailing list archive from the dim and distant past may cast light
upon this but I think current folk memory isn't up to it.

pws


  reply	other threads:[~2015-02-20  9:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 10:13 Peter Stephenson
2015-02-19 21:47 ` Mikael Magnusson
2015-02-19 22:03   ` Peter Stephenson
2015-02-20  3:16     ` Mikael Magnusson
2015-02-20  3:22       ` Mikael Magnusson
2015-02-20  3:33         ` Mikael Magnusson
2015-02-20  3:43           ` Mikael Magnusson
2015-02-20  4:19             ` Ray Andrews
2015-02-20  9:54               ` Peter Stephenson [this message]
2015-02-20 10:00             ` Peter Stephenson
2015-02-20 10:12               ` Mikael Magnusson
2015-02-22 18:26                 ` Peter Stephenson
2015-02-23  9:54                   ` Peter Stephenson
2015-02-23 10:11                     ` Peter Stephenson
2015-02-23 11:35                       ` Mikael Magnusson
2015-02-23 12:36                         ` Peter Stephenson
2015-02-23 12:57                           ` Peter Stephenson
2015-02-23 13:38                             ` Mikael Magnusson
2015-02-23 13:46                               ` Mikael Magnusson
2015-02-23 13:51                                 ` PATCH: Remeta one frame earlier Mikael Magnusson
2015-02-23 13:58                                   ` Peter Stephenson
2015-02-23 14:05                                   ` Peter Stephenson
2015-02-23 14:32                                     ` Mikael Magnusson
2015-02-23 17:32                                       ` Peter Stephenson

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=20150220095406.4e3ebb9d@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).