Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh-4.2.1: LINENO lost in evals
- X-seq: zsh-workers 20299
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: zsh-4.2.1: LINENO lost in evals
- Date: Wed, 1 Sep 2004 08:10:08 -0700 (PDT)
- Cc: Dieter Lambrecht <dieter.lambrecht@xxxxxx>
- In-reply-to: <200409011202.i81C27ic008335@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200409011202.i81C27ic008335@xxxxxxxxxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author