From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28896 invoked by alias); 16 Jul 2014 19:07:00 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32874 Received: (qmail 29626 invoked from network); 16 Jul 2014 19:06:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [86.6.157.246] X-Spam: 0 X-Authority: v=2.1 cv=U7AcDIbu c=1 sm=1 tr=0 a=BvYiZ/UW0Fmn8Wufq9dPrg==:117 a=BvYiZ/UW0Fmn8Wufq9dPrg==:17 a=NLZqzBF-AAAA:8 a=O0g8SLzPwWkA:10 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=3eGTMs6Hz-C9hmfciD0A:9 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 Date: Wed, 16 Jul 2014 19:59:59 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: history-incremental-search-backward weird behavior for multiline commands in 5.0.x Message-ID: <20140716195959.3014d4bf@pws-pc.ntlworld.com> In-Reply-To: <140716105417.ZM2695@torch.brasslantern.com> References: <140716091007.ZM2526@torch.brasslantern.com> <20140716173056.6515047e@pwslap01u.europe.root.pri> <140716105417.ZM2695@torch.brasslantern.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 16 Jul 2014 10:54:17 -0700 Bart Schaefer 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