From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5902 invoked from network); 2 Sep 2004 13:58:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Sep 2004 13:58:37 -0000 Received: (qmail 21548 invoked from network); 2 Sep 2004 13:58:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Sep 2004 13:58:32 -0000 Received: (qmail 19796 invoked by alias); 2 Sep 2004 13:58:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20306 Received: (qmail 19783 invoked from network); 2 Sep 2004 13:58:21 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Sep 2004 13:58:21 -0000 Received: (qmail 20332 invoked from network); 2 Sep 2004 13:57:22 -0000 Received: from imr6.us.db.com (160.83.65.199) by a.mx.sunsite.dk with SMTP; 2 Sep 2004 13:57:19 -0000 Received: from sdbo1002.db.com by imr6.us.db.com id i82DvHg6007955; Thu, 2 Sep 2004 09:57:18 -0400 (EDT) Subject: Re: zsh-4.2.1: LINENO lost in evals To: zsh-workers@sunsite.dk X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002 Message-ID: From: "Dieter Lambrecht" Date: Thu, 2 Sep 2004 15:57:10 +0200 X-MIMETrack: Serialize by Router on sdbo1002/Eschborn/DeuBaInt/DeuBa(5012HF695 | April 07, 2004) at 09/02/2004 03:58:23 PM MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi, the behaviour of LINENO-behavior may be similiar to perl in some curcum= stances. Script #! /bin/ksh print $LINENO eval 'print $LINENO' used with a real ksh on AIX or Solaris always prints the correct LINENO= . The behaviour of zsh is incompatible to ksh, even though in "emulate = ksh"-mode. Kind Regards, Dieter Lambrecht = = =20 Bart Schaefer = = =20 cc: Dieter Lambrec= ht/DMG/Zentrale/DeuBa@Zentrale = =20 Subject: Re: zsh-4.2.1:= LINENO lost in evals = =20 09/01/2004 05:10 = = =20 PM = = =20 Please respond to = = =20 zsh-workers = = =20 = = =20 = = =20 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 th= e kind in quotes. Zsh only has the kind in quotes. -- Diese E-Mail enth=E4lt vertrauliche und/oder rechtlich gesch=FCtzte Inf= ormationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail= irrt=FCmlich erhalten haben, informieren Sie bitte sofort den Absender= und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbef= ugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If = you are not the intended recipient (or have received this e-mail in err= or) please notify the sender immediately and destroy this e-mail. Any u= nauthorized copying, disclosure or distribution of the material in this= e-mail is strictly forbidden. =