about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/compmatch.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 49d53cb46..de8ff2af3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-10-22  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 33515: Src/Zle/compmatch.c: suppress parser error messages in
+	comp_match()
+
 	* 33493: Src/Builtins/rlimits.c, Src/exec.c: use correct command
 	name in error messages about "ulimit" failure; restore internal
 	copy of limits if setrlimit() fails, so the error won't repeat
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))