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/zle_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index f02b2b75d..e02ea14b8 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -839,13 +839,16 @@ bin_vared(char *name, char **args, char *ops, int func)
 	    tptr = tmparr = (char **)zhalloc(sizeof(char *)*(arrlen(arr)+1));
 	    for (aptr = arr; *aptr; aptr++) {
 		int sepcount = 0;
-		/* See if this word contains a separator character */
+		/*
+		 * See if this word contains a separator character
+		 * or backslash
+		 */
 		for (t = *aptr; *t; t++) {
 		    if (*t == Meta) {
 			if (isep(t[1] ^ 32))
 			    sepcount++;
 			t++;
-		    } else if (isep(*t))
+		    } else if (isep(*t) || *t == '\\')
 			sepcount++;
 		}
 		if (sepcount) {
@@ -858,7 +861,7 @@ bin_vared(char *name, char **args, char *ops, int func)
 			    if (isep(t[1] ^ 32))
 				*nptr++ = '\\';
 			    *nptr++ = *t++;
-			} else if (isep(*t))
+			} else if (isep(*t) || *t == '\\')
 			    *nptr++ = '\\';
 			*nptr++ = *t++;
 		    }