about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compcore.c1
-rw-r--r--Src/Zle/zle_tricky.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index b49fdd5c5..a21b83569 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -1653,6 +1653,7 @@ set_comp_sep(void)
 	    instring = QT_DOLLARS;
 	    nsptr++;
 	    tsptr++;
+	    swb++;
 	    break;
 	}
 
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index d678487db..1393027f7 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1032,6 +1032,16 @@ static int
 has_real_token(const char *s)
 {
     while (*s) {
+	/*
+	 * Special action required for $' strings, which
+	 * need to be treated like nulls.
+	 */
+	if ((*s == Qstring && s[1] == '\'') ||
+	    (*s == String && s[1] == Snull))
+	{
+	    s += 2;
+	    continue;
+	}
 	if (itok(*s) && !inull(*s))
 	    return 1;
 	s++;