1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-04 09:01:06 +01:00

37483: save and possibly restore cshnullglob failure state around each evaluation of an (e:...:) glob qualifier.

This commit is contained in:
Barton E. Schaefer 2016-01-01 19:20:14 -08:00
parent 5c17f9ab3f
commit b4643fce2d
2 changed files with 7 additions and 1 deletions

View file

@ -3802,13 +3802,16 @@ qualsheval(char *name, UNUSED(struct stat *buf), UNUSED(off_t days), char *str)
if ((prog = parse_string(str, 0))) {
int ef = errflag, lv = lastval, ret;
int cshglob = badcshglob;
unsetparam("reply");
setsparam("REPLY", ztrdup(name));
badcshglob = 0;
execode(prog, 1, 0, "globqual");
ret = lastval;
if ((ret = lastval))
badcshglob |= cshglob;
/* Retain any user interrupt error status */
errflag = ef | (errflag & ERRFLAG_INT);
lastval = lv;