about summary refs log tree commit diff
path: root/Src/Zle/compcore.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-01 15:29:41 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-01 15:29:41 +0000
commitf844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca (patch)
treec2a3b06a34243abe3826eead259bb08900f011f1 /Src/Zle/compcore.c
parent26cf7b8d50f1b7d9d0b9115018ef4dc8624b5030 (diff)
downloadzsh-f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca.tar.gz
zsh-f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca.tar.xz
zsh-f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca.zip
zsh-workers/8840
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r--Src/Zle/compcore.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index f37bdef54..193da880e 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -1495,6 +1495,25 @@ addmatches(Cadata dat, char **argv)
     LinkList aparl = NULL, oparl = NULL, dparl = NULL;
     Brinfo bp, bpl = brbeg, obpl, bsl = brend, obsl;
 
+    if (!*argv) {
+	SWITCHHEAPS(compheap) {
+	    HEAPALLOC {
+		/* Select the group in which to store the matches. */
+		gflags = (((dat->aflags & CAF_NOSORT ) ? CGF_NOSORT  : 0) |
+			  ((dat->aflags & CAF_UNIQALL) ? CGF_UNIQALL : 0) |
+			  ((dat->aflags & CAF_UNIQCON) ? CGF_UNIQCON : 0));
+		if (dat->group) {
+		    endcmgroup(NULL);
+		    begcmgroup(dat->group, gflags);
+		} else {
+		    endcmgroup(NULL);
+		    begcmgroup("default", 0);
+		}
+	    } LASTALLOC;
+	} SWITCHBACKHEAPS;
+
+	return 1;
+    }
     for (bp = brbeg; bp; bp = bp->next)
 	bp->curpos = ((dat->aflags & CAF_QUOTE) ? bp->pos : bp->qpos);
     for (bp = brend; bp; bp = bp->next)