Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: parse from even deeper in hell
On Thu, 19 Feb 2015 20:19:15 -0800
Ray Andrews <rayandrews@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author