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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 6964c9c04..079611015 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1612,11 +1612,11 @@ doexpansion(char *s, int lst, int olst, int explincmd)
 	prefork(vl, 0);
 	if (errflag)
 	    goto end;
-	if ((lst == COMP_LIST_EXPAND) || (lst == COMP_EXPAND)) {
+	if (lst == COMP_LIST_EXPAND || lst == COMP_EXPAND) {
 	    int ng = opts[NULLGLOB];
 
 	    opts[NULLGLOB] = 1;
-	    globlist(vl);
+	    globlist(vl, 1);
 	    opts[NULLGLOB] = ng;
 	}
 	if (errflag)
@@ -1645,11 +1645,14 @@ doexpansion(char *s, int lst, int olst, int explincmd)
 	foredel(we - wb);
 	while ((ss = (char *)ugetnode(vl))) {
 	    ret = 0;
-	    untokenize(ss);
 	    ss = quotename(ss, NULL);
+	    untokenize(ss);
 	    inststr(ss);
+#if 0
 	    if (olst != COMP_EXPAND_COMPLETE || nonempty(vl) ||
 		(cs && line[cs-1] != '/')) {
+#endif
+	    if (nonempty(vl)) {
 		spaceinline(1);
 		line[cs++] = ' ';
 	    }