Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: unset REPLY before e:: and oe:: so things don't break if it had acquired a weird type



Reported in 43032.
---
 Src/glob.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Src/glob.c b/Src/glob.c
index 5c6288060a..2817a9fc68 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1930,6 +1930,7 @@ zglob(LinkList list, LinkNode np, int nountok)
 
 			/* Parsed OK, execute for each name */
 			for (tmpptr = matchbuf; tmpptr < matchptr; tmpptr++) {
+			    unsetparam("REPLY");
 			    setsparam("REPLY", ztrdup(tmpptr->name));
 			    execode(prog, 1, 0, "globsort");
 			    if (!errflag)
@@ -3925,6 +3926,7 @@ qualsheval(char *name, UNUSED(struct stat *buf), UNUSED(off_t days), char *str)
 	int cshglob = badcshglob;
 
 	unsetparam("reply");
+	unsetparam("REPLY");
 	setsparam("REPLY", ztrdup(name));
 	badcshglob = 0;
 
-- 
2.38.1





Messages sorted by: Reverse Date, Date, Thread, Author