Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh _multi_parts patch and question
- X-seq: zsh-workers 38458
- From: Marko Myllynen <myllynen@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zsh _multi_parts patch and question
- Date: Tue, 10 May 2016 10:23:34 +0300
- 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
- Organization: Red Hat
- Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
Hi,
First here's a trivial patch to mention the -i option for _multi_parts:
---
Doc/Zsh/compsys.yo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index d478e81..203c436 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -4416,7 +4416,7 @@ the time this function is called, tt(compstate[insert]) is cleared, so
additional matches generated later are not inserted on the command line.
)
findex(_multi_parts)
-item(tt(_multi_parts) var(sep) var(array))(
+item(tt(_multi_parts) [ tt(-i) ] var(sep) var(array))(
The argument var(sep) is a separator character.
The var(array) may be either the
name of an array parameter or a literal array in the form
But I have a question as well, am I perhaps missing something obvious
or is this is a bug in multiparts - consider this example:
#compdef foo
local curcontext="$curcontext" state line expl
_arguments -C -s -w \
'(- *)'{-h,--help}'[display help information]' \
'(- *)'{-V,--version}'[print program version]' \
"(-t --test)"{-t+,--test}'[test]:test:->multipart' \
'*:foo:_files' \
&& return 0
if [[ $state == multipart ]]; then
# Ok
# typeset -a res
# res=( a.b.a a.b.b b.a.a b.a.b c.a.a c.a.b )
# _wanted test expl test _multi_parts -i . res && return 0
# Fail
_wanted test expl test _multi_parts -i . \
( a.b.a a.b.b b.a.a b.a.b c.a.a c.a.b ) && return 0
fi
So the former approach works but according to the man page the latter
should work as well, no?
Thanks,
--
Marko Myllynen
Messages sorted by:
Reverse Date,
Date,
Thread,
Author