Subject: Re: Bug in syntax check
From: Bart Schaefer <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 3 Jun 2016 23:46:56 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jun 4,  5:13am, Felipe Contreras wrote:
} 
} The following script works fine, but when run with 'zsh -n' the syntax
} checker returns an error:
} 
} 6: no such user or named directory: tmp

diff --git a/Src/subst.c b/Src/subst.c
index 4e13ce1..8e704b1 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -691,7 +691,7 @@ filesubstr(char **namptr, int assign)
 		return 0;
 	    *ptr = 0;
 	    if (!(hom = getnameddir(++str))) {
-		if (isset(NOMATCH))
+		if (isset(NOMATCH) && isset(EXECOPT))
 		    zerr("no such user or named directory: %s", str);
 		*ptr = save;
 		return 0;