1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-02 17:01:19 +02:00

20318: Fix xtrace output bug introduced by 20308.

This commit is contained in:
Bart Schaefer 2004-09-04 16:59:35 +00:00
parent 97fd0d9b89
commit 91a08a2517
2 changed files with 10 additions and 4 deletions

@ -1,3 +1,8 @@
2004-09-04 Bart Schaefer <schaefer@zsh.org>
* 20318: Src/builtin.c: fix subtle xtrace output bug introduced
by 20308.
2004-09-03 Peter Stephenson <pws@csr.com> 2004-09-03 Peter Stephenson <pws@csr.com>
* 20308: Doc/Zsh/options.yo, Src/builtin.c, Src/exec.c, * 20308: Doc/Zsh/options.yo, Src/builtin.c, Src/exec.c,

@ -4235,16 +4235,18 @@ bin_eval(UNUSED(char *nam), char **argv, UNUSED(Options ops), UNUSED(int func))
* we use a special script name to indicate the special line number. * we use a special script name to indicate the special line number.
*/ */
ineval = !isset(EVALLINENO); ineval = !isset(EVALLINENO);
if (!ineval)
scriptname = "(eval)";
prog = parse_string(zjoin(argv, ' ', 1)); prog = parse_string(zjoin(argv, ' ', 1));
if (!prog) { if (!prog) {
errflag = 0; errflag = 0;
scriptname = oscriptname;
ineval = oineval;
return 1; return 1;
} }
lastval = 0; lastval = 0;
if (!ineval)
scriptname = "(eval)";
execode(prog, 1, 0); execode(prog, 1, 0);
@ -4253,8 +4255,7 @@ bin_eval(UNUSED(char *nam), char **argv, UNUSED(Options ops), UNUSED(int func))
errflag = 0; errflag = 0;
} }
if (!ineval) scriptname = oscriptname;
scriptname = oscriptname;
ineval = oineval; ineval = oineval;
return lastval; return lastval;