about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-01-08 15:29:46 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-01-08 15:29:46 +0000
commit2ed74b89eaf9904293b3b0b95f59d0620c114b05 (patch)
tree189431a33180837fb2c05cf5da0b38ad4724e0df /Src/Zle
parentba968d10de8be0c8dcef4e652dd97e25fc495553 (diff)
downloadzsh-2ed74b89eaf9904293b3b0b95f59d0620c114b05.tar.gz
zsh-2ed74b89eaf9904293b3b0b95f59d0620c114b05.tar.xz
zsh-2ed74b89eaf9904293b3b0b95f59d0620c114b05.zip
don't report _arguments-specs more than once (not even shared options with multiple sets) (16417)
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/computil.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 2da2b3634..58115f537 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -2315,6 +2315,7 @@ bin_comparguments(char *nam, char **args, char *ops, int func)
 	    LinkList direct = newlinklist();
 	    LinkList odirect = newlinklist();
 	    LinkList equal = newlinklist(), l;
+            LinkNode node;
 	    Caopt p;
 	    char *str;
 	    int ret = 1;
@@ -2349,7 +2350,13 @@ bin_comparguments(char *nam, char **args, char *ops, int func)
 				strcat(str, p->descr);
 			    } else
 				str = bslashcolon(p->name);
-			    addlinknode(l, str);
+
+                            for (node = firstnode(l); node; incnode(node))
+                                if (!strcmp(str, (char *) getdata(node)))
+                                    break;
+
+                            if (!node)
+                                addlinknode(l, str);
 			}
 		    }
 		}