From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25696 invoked from network); 13 Aug 2008 20:52:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) 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.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Aug 2008 20:52:07 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 39012 invoked from network); 13 Aug 2008 20:51:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Aug 2008 20:51:59 -0000 Received: (qmail 25165 invoked by alias); 13 Aug 2008 20:51:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25449 Received: (qmail 25144 invoked from network); 13 Aug 2008 20:51:49 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 13 Aug 2008 20:51:49 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id 99EF680EA0B3 for ; Wed, 13 Aug 2008 22:51:45 +0200 (CEST) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080813205144.FCUB777.mtaout01-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Wed, 13 Aug 2008 21:51:44 +0100 Received: from pws-pc ([81.107.40.67]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20080813205144.PIQG29597.aamtaout03-winn.ispmail.ntl.com@pws-pc> for ; Wed, 13 Aug 2008 21:51:44 +0100 Date: Wed, 13 Aug 2008 21:51:38 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: Getting source file and line number of a function. Message-ID: <20080813215138.2f16e81d@pws-pc> In-Reply-To: <2d460de70808110700x1dcd6460i94327cbf0315f17a@mail.gmail.com> References: <6cd6de210807261806r7ff184fdtcc7859cca0a98aef@mail.gmail.com> <200807280834.m6S8YEVo026326@news01.csr.com> <6cd6de210807280546k14a1a59fo40cb6ed968b1227b@mail.gmail.com> <20080809192111.7213e919@pws-pc> <2d460de70808110700x1dcd6460i94327cbf0315f17a@mail.gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8027/Wed Aug 13 20:31:07 2008 on bifrost X-Virus-Status: Clean On Mon, 11 Aug 2008 16:00:21 +0200 "Richard Hartmann" wrote: > On Sat, Aug 9, 2008 at 20:21, Peter Stephenson > wrote: > > [stuff about $funcfiletrace] (which now really is called that...) > This just gave me an idea: Why not enhance `whence` so it is able to > tell in what file and starting on what line a function has been defined? Just to note I haven't forgot this yet (haven't looked at if or where it fits without messing up the format). I think it would be useful to provide an associative array in zsh/parameter with this information to get at it easily, something like $functionsources (since the assoc array with the functions is called $functions). -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/