From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 448 invoked from network); 1 Sep 2004 15:10:28 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Sep 2004 15:10:28 -0000 Received: (qmail 34329 invoked from network); 1 Sep 2004 15:10:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Sep 2004 15:10:21 -0000 Received: (qmail 23896 invoked by alias); 1 Sep 2004 15:10:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20299 Received: (qmail 23867 invoked from network); 1 Sep 2004 15:10:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Sep 2004 15:10:15 -0000 Received: (qmail 34039 invoked from network); 1 Sep 2004 15:10:15 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 1 Sep 2004 15:10:13 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i81FA8rM027395; Wed, 1 Sep 2004 08:10:08 -0700 Date: Wed, 1 Sep 2004 08:10:08 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: zsh-workers@sunsite.dk cc: Dieter Lambrecht Subject: Re: zsh-4.2.1: LINENO lost in evals In-Reply-To: <200409011202.i81C27ic008335@news01.csr.com> Message-ID: References: <200409011202.i81C27ic008335@news01.csr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.9 required=6.0 tests=BAYES_30 autolearn=no version=2.63 X-Spam-Hits: -0.9 On Wed, 1 Sep 2004, Peter Stephenson wrote: > "Dieter Lambrecht" wrote: > >#! /bin/zsh -x > > (There must be a set -x or setopt xtrace lurking somewhere.) Welcome back, Peter. :-) > It's not actually lost, it's showing you the line in the eval. That's > a feature (compare error messages from Perl evals, which is where we > pinched the output format from). The thing is, Perl has two kinds of "eval": schaefer[676] perl <<\EOF print __LINE__."\n"; eval 'print __LINE__."\n"'; eval { print __LINE__."\n"; }; EOF 1 1 3 The kind in braces, which gets precompiled, behaves differently than the kind in quotes. Zsh only has the kind in quotes.