diff options
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/computil.c | 9 |
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); } } } |