about summary refs log tree commit diff
path: root/Src/Zle/zle_tricky.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_tricky.c')
-rw-r--r--Src/Zle/zle_tricky.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index c28ea04aa..3a500e5b1 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1592,7 +1592,7 @@ get_comp_string(void)
 		else if (*p == Snull)
 		    *p = '\'';
 	}
-	if (*s == Snull || *s == Dnull) {
+	if ((*s == Snull || *s == Dnull) && !has_token(s + 1)) {
 	    char *q = (*s == Snull ? "'" : "\""), *n = tricat(qipre, q, "");
 	    int sl = strlen(s);
 
@@ -2299,7 +2299,7 @@ match_str(char *l, char *w, int *bp, int *rwlp, int sfx, int test)
 		t = 1;
 		if ((lm && lm == mp) ||
 		    ((oll == ll || olw == lw) &&
-		     (test == 1 || (!mp->left && !mp->right)) &&
+		     (test == 1 || (test && !mp->left && !mp->right)) &&
 		     mp->wlen < 0))
 		    /* If we were called recursively, don't use `*' patterns
 		     * at the beginning (avoiding infinite recursion). */