about summary refs log tree commit diff
path: root/Src/Zle/compmatch.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-10-22 20:21:10 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-10-22 20:21:10 -0700
commitb6921a2b443faa92415cd8fb02befa3a0a8d353a (patch)
tree5bc2c1fd38f45ef48d3d46fb16c257bf0fe28c64 /Src/Zle/compmatch.c
parent2d4743ce50ba0ae50c0cfa1404a163dbd61ad446 (diff)
downloadzsh-b6921a2b443faa92415cd8fb02befa3a0a8d353a.tar.gz
zsh-b6921a2b443faa92415cd8fb02befa3a0a8d353a.tar.xz
zsh-b6921a2b443faa92415cd8fb02befa3a0a8d353a.zip
33515: suppress parser error messages in comp_match()
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r--Src/Zle/compmatch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 4cd3b9ffe..05ae43ae6 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -1014,6 +1014,7 @@ comp_match(char *pfx, char *sfx, char *w, Patprog cp, Cline *clp, int qu,
 	   Brinfo *bpl, int bcp, Brinfo *bsl, int bcs, int *exact)
 {
     char *r = NULL;
+    int onoerrs = noerrs;
 
     if (cp) {
 	/* We have a globcomplete-like pattern, just use that. */
@@ -1033,12 +1034,14 @@ comp_match(char *pfx, char *sfx, char *w, Patprog cp, Cline *clp, int qu,
 	     */
 	    teststr = dupstring(r);
 	    tokenize(teststr);
+	    noerrs = 1;
 	    if (parse_subst_string(teststr))
 		teststr = r;
 	    else {
 		remnulargs(teststr);
 		untokenize(teststr);
 	    }
+	    noerrs = onoerrs;
 	} else
 	    teststr = r;
 	if (!pattry(cp, teststr))