zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: history-incremental-search-backward weird behavior for multiline commands in 5.0.x
Date: Wed, 16 Jul 2014 19:59:59 +0100	[thread overview]
Message-ID: <20140716195959.3014d4bf@pws-pc.ntlworld.com> (raw)
In-Reply-To: <140716105417.ZM2695@torch.brasslantern.com>

On Wed, 16 Jul 2014 10:54:17 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Jul 16,  5:30pm, Peter Stephenson wrote:
> } Subject: Re: history-incremental-search-backward weird behavior for multil
> }
> } I think the load parsing must be broken --- I'm pretty sure it always
> } used doubled backslashes to signal this and it obviously used to work.
> 
> This appears to have somethign to do with workers/28332 and 28339, but
> I'm not yet sure exactly what.

Certainly if I comment out code in readhistline() as follows, it reads
back in again the same as 4.3.11 (which just happens to be the first old
version that worked).

	else {
	    buf[len - 1] = '\0';
	    if (len > 1 && buf[len - 2] == '\\' /*&&
		(len < 3 || buf[len - 3] != '\\')*/) {
		buf[--len - 1] = '\n';
		if (!feof(in))
		    return readhistline(len, bufp, bufsiz, in);
	    }
	}

However, that's not the whole story --- the extended history is written
out with each segment:

: 1405536461:0;echo foo \\
: 1405536465:0;bar \\
: 1405536465:0;rod

which can't be right because it reads back as

echo foo \          
: 1405536465:0;bar \
: 1405536465:0;rod

in both the latest code and 4.3.11.  The latter saves without the
extended history,

: 1405536927:0;echo foo1 \\
bar1 \\
rod1

pws


  reply	other threads:[~2014-07-16 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 12:48 Augie Fackler
2014-07-16 16:10 ` Bart Schaefer
2014-07-16 16:30   ` Peter Stephenson
2014-07-16 17:54     ` Bart Schaefer
2014-07-16 18:59       ` Peter Stephenson [this message]
2014-07-17 13:02         ` Augie Fackler

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=20140716195959.3014d4bf@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).