From 02eb1595e8687fd0facd4a8b0e4a19c61a35b664 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 22 Dec 2016 16:12:42 +0100 Subject: 40162: _arguments support for a match spec in combination with sets --- ChangeLog | 5 +++++ Src/Zle/computil.c | 2 +- Test/Y03arguments.ztst | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e9d945748..8e07e45fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-12-22 Oliver Kiddle + + * 40162: Src/Zle/computil.c, Test/Y03arguments.ztst: _arguments + support for a match spec in combination with sets + 2016-12-22 Daniel Shahaf * unposted: Config/version.mk: Post-release version bump to 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 -- -- cgit 1.4.1