diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-01-08 15:29:46 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-01-08 15:29:46 +0000 |
commit | 2ed74b89eaf9904293b3b0b95f59d0620c114b05 (patch) | |
tree | 189431a33180837fb2c05cf5da0b38ad4724e0df | |
parent | ba968d10de8be0c8dcef4e652dd97e25fc495553 (diff) | |
download | zsh-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)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/computil.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 3e121ba87..e603cd64d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-01-08 Sven Wischnowsky <wischnow@zsh.org> + + * 16417: Src/Zle/computil.c: don't report _arguments-specs more + than once (not even shared options with multiple sets) + 2002-01-07 Sven Wischnowsky <wischnow@zsh.org> * 16408: Src/Zle/compcore.c: make sure auto menu isn't started 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); } } } |