From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3679 invoked from network); 3 Jan 2008 17:24:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Jan 2008 17:24:03 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 76690 invoked from network); 3 Jan 2008 17:23:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Jan 2008 17:23:59 -0000 Received: (qmail 20188 invoked by alias); 3 Jan 2008 17:23:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24342 Received: (qmail 20174 invoked from network); 3 Jan 2008 17:23:54 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 3 Jan 2008 17:23:54 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id E18C08058FF2 for ; Thu, 3 Jan 2008 18:23:52 +0100 (CET) Received: from mtaout03-winn.ispmail.ntl.com (mtaout03-winn.ispmail.ntl.com [81.103.221.49]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Thu, 3 Jan 2008 18:23:52 +0100 (CET) Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20080103172506.LLCX20647.mtaout03-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Thu, 3 Jan 2008 17:25:06 +0000 Received: from pws-pc ([82.6.96.116]) by aamtaout04-winn.ispmail.ntl.com with SMTP id <20080103172352.PYHJ29112.aamtaout04-winn.ispmail.ntl.com@pws-pc> for ; Thu, 3 Jan 2008 17:23:52 +0000 Date: Thu, 3 Jan 2008 17:23:11 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: zero elapsed time in history with certain preexec functions Message-Id: <20080103172311.cf2757df.p.w.stephenson@ntlworld.com> In-Reply-To: <071229103309.ZM7557@torch.brasslantern.com> References: <477154ED.70001@csail.mit.edu> <071229103309.ZM7557@torch.brasslantern.com> X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP On Sat, 29 Dec 2007 10:33:07 -0800 Bart Schaefer wrote: > On Dec 25, 2:07pm, Michael Kaminsky wrote: > } > } It appears that subscripting a variable (or indexing into a zsh array) > } inside of the preexec function causes zsh not to record the elapsed > } time/duration of the command. > > A time is recorded, but it's the wrong time. > > The following seems to fix it, but someone more familiar with this part > of the history mechanism should check my work: Looks entirely reasonable, without having done more than a cursory look. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/