From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18111 invoked from network); 9 Jul 2001 19:28:25 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jul 2001 19:28:25 -0000 Received: (qmail 27269 invoked by alias); 9 Jul 2001 19:22:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15344 Received: (qmail 27252 invoked from network); 9 Jul 2001 19:22:30 -0000 From: "Bart Schaefer" Message-Id: <1010709191942.ZM22706@candle.brasslantern.com> Date: Mon, 9 Jul 2001 19:19:42 +0000 In-Reply-To: Comments: In reply to Peter Stephenson "Re: Debugging of dynamocally defined functions" (Jul 9, 7:36pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Debugging of dynamocally defined functions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 9, 7:36pm, Peter Stephenson wrote: } Subject: Re: Debugging of dynamocally defined functions } } "Bart Schaefer" wrote: } > I was fooling with almost exactly the same thing, though I'd been trying } > to figure out a nice way to embed the line number of the eval inside the } > `(eval)' string; e.g. for an eval on line 30 of the calling function you } > would see something like } > } > (30:eval):1: echo foo } > (30:eval):2: echo bar There's one other extremely minor problem with this. I have my PS4 string set to begin with ": " and end with ";" because then I can cut'n'paste xtrace output and the PS4 stuff is discarded as a `:' command. But with the parens in there around the `(eval)', I get globbing errors when I cut'n'paste. } Maybe we need to grab another prompt escape. I was toying with something like %N{...}, where you could use other prompt escapes inside the {...} the way you can use strftime escapes in %D{...}. But really what we'd need is a %(X.T.F) sort of thing, where X is true if you're inside an eval, so that one could write PS4='%(e.(%i:eval%).%N)... ' Except that then we'd also need a way for %i to specify that it's actually the saved line number from the surrounding scope, etc. etc. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net