From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13353 invoked by alias); 20 Sep 2012 14:14:07 -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: 30687 Received: (qmail 6430 invoked from network); 20 Sep 2012 14:13:55 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Thu, 20 Sep 2012 15:12:25 +0100 From: Peter Stephenson To: Mailing-list zsh-workers Subject: Re: Completion and REPORTTIME Message-ID: <20120920151225.206d30c0@pwslap01u.europe.root.pri> In-Reply-To: References: Organization: Cambridge Silicon Radio 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-Originating-IP: [10.101.10.18] X-Scanned-By: MailControl 9446.0 (www.mailcontrol.com) on 10.71.0.140 On Thu, 20 Sep 2012 14:57:19 +0200 Julien Nicoulaud wrote: > When REPORTTIME, time can be reported on some slow compdefs, which kinda > breaks output. I think time reporting should be disabled in the context of > completion functions execution, don't you ? As it's dumped straight to stderr, it's hard to see any point in having it output automatically from any zle code. Index: Doc/Zsh/params.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/params.yo,v retrieving revision 1.70 diff -p -u -r1.70 params.yo --- Doc/Zsh/params.yo 15 Jun 2012 21:22:36 -0000 1.70 +++ Doc/Zsh/params.yo 20 Sep 2012 14:10:47 -0000 @@ -1225,7 +1225,10 @@ vindex(REPORTTIME) item(tt(REPORTTIME))( If nonnegative, commands whose combined user and system execution times (measured in seconds) are greater than this value have timing -statistics printed for them. +statistics printed for them. Output is surpressed for commands +executed within the line editor, including completion; commands +explicitly marked with the tt(time) keyword still cause the summary +to be printed in this case. ) vindex(REPLY) item(tt(REPLY))( Index: Src/jobs.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/jobs.c,v retrieving revision 1.90 diff -p -u -r1.90 jobs.c --- Src/jobs.c 22 May 2012 08:57:23 -0000 1.90 +++ Src/jobs.c 20 Sep 2012 14:10:47 -0000 @@ -868,6 +868,8 @@ should_report_time(Job j) /* can this ever happen? */ if (!j->procs) return 0; + if (zleactive) + return 0; #ifdef HAVE_GETRUSAGE reporttime -= j->procs->ti.ru_utime.tv_sec + j->procs->ti.ru_stime.tv_sec; -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog