From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19852 invoked from network); 13 May 2004 14:58:57 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 13 May 2004 14:58:57 -0000 Received: (qmail 9415 invoked from network); 13 May 2004 14:58:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 May 2004 14:58:42 -0000 Received: (qmail 18334 invoked by alias); 13 May 2004 14:58:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19934 Received: (qmail 18318 invoked from network); 13 May 2004 14:58:30 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 13 May 2004 14:58:27 -0000 Received: (qmail 8923 invoked from network); 13 May 2004 14:58:27 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 13 May 2004 14:58:25 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i4DEvwv14084 for ; Thu, 13 May 2004 14:57:58 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Thu, 13 May 2004 15:57:27 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 13 May 2004 15:59:39 +0100 To: zsh-workers@sunsite.dk Subject: Re: zcalc bug In-reply-to: "Thomas =?iso-8859-1?Q?K=F6hler?="'s message of "Thu, 13 May 2004 16:04:51 +0200." <20040513140450.GA27267@picard.franken.de> Date: Thu, 13 May 2004 15:57:58 +0100 Message-ID: <20277.1084460278@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 13 May 2004 14:59:39.0156 (UTC) FILETIME=[E9F84D40:01C438FA] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: ** X-Spam-Status: No, hits=2.1 required=6.0 tests=BAYES_90 autolearn=no version=2.63 X-Spam-Hits: 2.1 Thomas =?iso-8859-1?Q?K=F6hler?= wrote: > print -P %h > 504 > ~> zcalc > 1> 1+2+3 > 6 > ~> print -P %h > 1014 Aha, now I understand. This much is sufficient to show the problem. (By pruning it I may have made the numbers inconsistent, though I think not). Concise bug reports are a Good Thing. zcalc switches the history to its own file, then at the end switches back. Unfortunately the only way of switching back to the main file at the end, removing the zcalc stuff, is to read it back in again. This overwrites the numbers. The only obvious alternative is to leave zcalc entries in the main history, so in the previous example scrolling back from the final prompt would take you through `print -P %h', `1+2+3', `print -P %h'. This was the older (and easier) behaviour. I decided an attempt to separate the histories would be better. This could be configurable, but neither behaviour is perfect. There is no direct way of manipulating the history, only reading it and writing or appending it. There may be some hack I haven't thought of, but the history number handling is buried deep inside. Wayne, have you any idea how easy it would be to implement something to make switching history files easy? E.g. could it be just a matter of resetting history numbers at the right point when reading in? I have always dreamed of having a way of manipulating the history directly using variables. However, given all the features of the history, this isn't easy to do properly. I don't have remotely enough time and there are many higher priority problems. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************