From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24725 invoked by alias); 27 Mar 2015 10:16:42 -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: 34787 Received: (qmail 1829 invoked from network); 27 Mar 2015 10:16:40 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc86d0000066b7-ea-55152e029d3c Date: Fri, 27 Mar 2015 10:16:32 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: PATCH: ancient history bug Message-id: <20150327101632.72534a47@pwslap01u.europe.root.pri> In-reply-to: <20150326202321.3f7fc86f@ntlworld.com> References: <20150326202321.3f7fc86f@ntlworld.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKLMWRmVeSWpSXmKPExsVy+t/xK7pMeqKhBr+emFgcbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujKsPTrIUdPBWzPj4k62BcR1XFyMnh4SAicTnlf/YIGwxiQv3 1gPZXBxCAksZJT6+6WQCSQgJLGGSWLk0DSKxjVFi2pWVjCAJFgFViUOLlrGD2GwChhJTN80G i4sIaEnsOHkSrFlYQF1i4bO7YDavgL1E959tYDangLHEjCN3mCEWGEm8bToBdgW/gL7E1b+f mCAuspeYeeUMI0SvoMSPyfdYQGxmoPmbtzWxQtjyEpvXvIWaoy5x4+5u9gmMQrOQtMxC0jIL ScsCRuZVjKKppckFxUnpuUZ6xYm5xaV56XrJ+bmbGCFB+3UH49JjVocYBTgYlXh4OetFQoVY E8uKK3MPMUpwMCuJ8K58DBTiTUmsrEotyo8vKs1JLT7EyMTBKdXAyGcYuuxo+jID9wn/vdrn Of68/Wa5cplz4DXtWQxnGhVbpPlYvDPOHvO90nn/+a+Hfi7/BRocAh7c5DZJfyB9YN1UB61T J20jgn6dKA1YctQpgdU7dWHY0/ydjO1zS3kZDzL/eJWkKvaYhePOqUyVcr0dy0TcE6ROFX93 7m7sip3IqHm2KrVXiaU4I9FQi7moOBEA3KAcqjgCAAA= On Thu, 26 Mar 2015 20:23:21 +0000 Peter Stephenson wrote: > Adding some further history tests (which I'll get back to tomorrow), There should be more but this tests for the bug I fixed. pws diff --git a/Test/W01history.ztst b/Test/W01history.ztst index cfc248c..6ef9b11 100644 --- a/Test/W01history.ztst +++ b/Test/W01history.ztst @@ -7,6 +7,47 @@ %test $ZTST_testdir/../Src/zsh -fis <<<' + print one two three four five six seven eight nine ten + print !:$ !:10 !:9 !:1 !:0 + print one two three four five six seven eight nine ten + print !:0-$ !:1-2 + ' 2>/dev/null +0:History word references +>one two three four five six seven eight nine ten +>ten ten nine one print +>one two three four five six seven eight nine ten +>print one two three four five six seven eight nine ten one two + + $ZTST_testdir/../Src/zsh -fis <<<' + print line one of an arbitrary series + print issue two for some mystery sequence + print !-1:5-$ + print !1:2 + print !2:2 + print !-3:1-$ + ' 2>/dev/null +0:History line numbering +>line one of an arbitrary series +>issue two for some mystery sequence +>mystery sequence +>one +>two +>mystery sequence + + $ZTST_testdir/../Src/zsh -fis <<<' + print All metaphor, Malachi, stilts and all + print !1:2:s/,/\\\\?/ !1:2:s/m/shm/:s/,/\!/ + print !1:2:& + print -l !1:2-3:gs/a/o/ + ' 2>/dev/null +0:History substitution +>All metaphor, Malachi, stilts and all +>metaphor? shmetaphor! +>metaphor! +>metophor, +>Molochi, + + $ZTST_testdir/../Src/zsh -fis <<<' echo foo bar echo $(!!) again echo more $( !! )' 2>/dev/null