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

Re: Bug in syntax check



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;



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