about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-07-09 18:31:24 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-07-09 18:31:24 +0000
commit7060b34457f579864bddbe1caa3e3cdfea6981e2 (patch)
tree928f53c3e47e536f49beb26ae15a36a41a872c0a /Src
parent4872ed50868379e769ce905a4af3ae7dfcef09d7 (diff)
downloadzsh-7060b34457f579864bddbe1caa3e3cdfea6981e2.tar.gz
zsh-7060b34457f579864bddbe1caa3e3cdfea6981e2.tar.xz
zsh-7060b34457f579864bddbe1caa3e3cdfea6981e2.zip
15334: use string "(eval)" as script name in debugging messages in eval's
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 9a792e15c..c5491eb6b 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3420,6 +3420,9 @@ int
 bin_eval(char *nam, char **argv, char *ops, int func)
 {
     Eprog prog;
+    char *oscriptname = scriptname;
+
+    scriptname = "(eval)";
 
     prog = parse_string(zjoin(argv, ' ', 1));
     if (!prog) {
@@ -3431,6 +3434,9 @@ bin_eval(char *nam, char **argv, char *ops, int func)
 	lastval = errflag;
 	errflag = 0;
     }
+
+    scriptname = oscriptname;
+
     return lastval;
 }