about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-10-17 11:07:47 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-10-17 11:07:47 +0000
commit47f979381ff34e83ff006897ce52c3692cd06c05 (patch)
treeb0d46e18b45cfa5361632ebee46021e9786fcadd /Src
parentf9eb4b60bd5ee425689fdd3f7b65f120ed719917 (diff)
downloadzsh-47f979381ff34e83ff006897ce52c3692cd06c05.tar.gz
zsh-47f979381ff34e83ff006897ce52c3692cd06c05.tar.xz
zsh-47f979381ff34e83ff006897ce52c3692cd06c05.zip
various old patches ported back
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compcore.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 97ed6d58f..94cb914d8 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -2641,6 +2641,8 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp)
 	    }
 	} else {
 	    if (!(flags & CGF_UNIQALL) && !(flags & CGF_UNIQCON)) {
+                int dup;
+
 		for (ap = rp; *ap; ap++) {
 		    for (bp = cp = ap + 1; *bp; bp++) {
 			if (!matcheq(*ap, *bp))
@@ -2649,6 +2651,17 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp)
 			    n--;
 		    }
 		    *cp = NULL;
+                    if (!(*ap)->disp) {
+                        for (dup = 0, bp = ap + 1; *bp; bp++)
+                            if (!(*bp)->disp &&
+                                !((*bp)->flags & CMF_MULT) &&
+                                !strcmp((*ap)->str, (*bp)->str)) {
+                                (*bp)->flags |= CMF_MULT;
+                                dup = 1;
+                            }
+                        if (dup)
+                            (*ap)->flags |= CMF_FMULT;
+                    }
 		}
 	    } else if (!(flags & CGF_UNIQCON)) {
 		int dup;