about summary refs log tree commit diff
path: root/Src/Zle/compctl.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-22 22:29:54 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-22 22:29:54 +0000
commit9acc1dd713d95c0e894b4eee86f524888753f8a3 (patch)
tree164b27b8d4f8d14f7bbfc8490a82cf7c18764bc2 /Src/Zle/compctl.c
parent44d88901e55693062a86e84665af06a4897716c9 (diff)
downloadzsh-9acc1dd713d95c0e894b4eee86f524888753f8a3.tar.gz
zsh-9acc1dd713d95c0e894b4eee86f524888753f8a3.tar.xz
zsh-9acc1dd713d95c0e894b4eee86f524888753f8a3.zip
zsh-workers/8001
Diffstat (limited to 'Src/Zle/compctl.c')
-rw-r--r--Src/Zle/compctl.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index 50cdadf26..0f42372f0 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -750,6 +750,14 @@ get_compctl(char *name, char ***av, Compctl cc, int first, int isdef, int cl)
 		}
 		cct.mask2 |= CC_NOSORT;
 		break;
+	    case '1':
+		cct.mask2 |= CC_UNIQALL;
+		cct.mask2 &= ~CC_UNIQCON;
+		break;
+	    case '2':
+		cct.mask2 |= CC_UNIQCON;
+		cct.mask2 &= ~CC_UNIQALL;
+		break;
 	    case 'M':
 		if (cclist & COMP_LIST) {
 		    cclist |= COMP_LISTMATCH;
@@ -1439,7 +1447,7 @@ printcompctl(char *s, Compctl cc, int printflags, int ispat)
     }
 
     /* loop through flags w/o args that are set, printing them if so */
-    if (flags & t) {
+    if ((flags & t) || (flags2 & (CC_UNIQALL | CC_UNIQCON))) {
 	printf(" -");
 	if ((flags & (CC_ALREG | CC_ALGLOB)) == (CC_ALREG | CC_ALGLOB))
 	    putchar('a'), flags &= ~(CC_ALREG | CC_ALGLOB);
@@ -1450,6 +1458,10 @@ printcompctl(char *s, Compctl cc, int printflags, int ispat)
 	    flags >>= 1;
 	    t >>= 1;
 	}
+	if (flags2 & CC_UNIQALL)
+	    putchar('1');
+	else if (flags2 & CC_UNIQCON)
+	    putchar('2');
     }
     if (flags2 & (CC_XORCONT | CC_PATCONT | CC_DEFCONT)) {
 	printf(" -t");
@@ -1788,6 +1800,14 @@ bin_compadd(char *name, char **argv, char *ops, int func)
 		sp = &(dat.group);
 		e = "group name expected after -%c";
 		break;
+	    case '1':
+		if (!(dat.aflags & CAF_UNIQCON))
+		    dat.aflags |= CAF_UNIQALL;
+		break;
+	    case '2':
+		if (!(dat.aflags & CAF_UNIQALL))
+		    dat.aflags |= CAF_UNIQCON;
+		break;
 	    case 'y':
 		sp = &(dat.ylist);
 		e = "string expected after -%c";