Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _arguments sets and a match spec
- X-seq: zsh-workers 40162
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: _arguments sets and a match spec
- Date: Mon, 12 Dec 2016 15:51:50 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1481554310; bh=yl8yy8XwhO9qohPWawHs96+uejlL9NvSHt3YlMvIeIA=; h=From:To:Subject:Date:From:Subject; b=bu4ItbLQpWaRW9gWyNKUTg8xsTZjsOLpGg6bJZE+uWS8Ne/EbUrNvF8zezjnIUbnO3JwzvoOqI5OtpK45Rso70/NSQLXWxwHSlrNoHdSiZaqGbBckach39vJ6esN0I1kX3nJU1p+tGoUkyzR7+Fqhv7EJTy5SIR0E/jR/GNoYQaMMaS0LI6mthek8/oueBuMhsNHxRi35+SSXSRQI1fnuDV2oeOnsLb4KkxF0VvcR+KDO6+hw1B/Q5onrPw+SGosowUOcSXaL0GnP23EaLe3TTmraYM6lPVtChI/JZm82RS0WMne8Re+866Qg4rLy7ZEr6A3Xv6KDvK0+dwtvIaKRg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
A match spec passed to _arguments wouldn't work in combination with
sets.
Oliver
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 192ddeab9..d2f0c999b 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1288,7 +1288,7 @@ parse_cadef(char *nam, char **args)
ret->ndopts = ndopts;
ret->nodopts = nodopts;
set_cadef_opts(ret);
- ret = ret->snext = alloc_cadef(NULL, single, NULL, nonarg, flags);
+ ret = ret->snext = alloc_cadef(NULL, single, match, nonarg, flags);
optp = &(ret->opts);
nopts = ndopts = nodopts = 0;
anum = 1;
diff --git a/Test/Y03arguments.ztst b/Test/Y03arguments.ztst
index 6f0cac034..d09b118a2 100644
--- a/Test/Y03arguments.ztst
+++ b/Test/Y03arguments.ztst
@@ -277,6 +277,11 @@
>line: {tst j}{}
>line: {tst -y }{}
+ tst_arguments -M 'm:{j}={y}' -y -n - set1 -i - set2 -k
+ comptest $'tst -k -j\t'
+0:matcher in combination with sets (implies separate cadef structure)
+>line: {tst -k -y }{}
+
tst_arguments -x :word
comptest $'tst -- -\t'
0:option after --
Messages sorted by:
Reverse Date,
Date,
Thread,
Author