From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: _arguments sets and a match spec
Date: Mon, 12 Dec 2016 15:51:50 +0100 [thread overview]
Message-ID: <27976.1481554310@hydra.kiddle.eu> (raw)
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 --
reply other threads:[~2016-12-12 14:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27976.1481554310@hydra.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).