Subject: zsh _multi_parts patch and question
From: Marko Myllynen <[email-masked]>
To: [email-masked]
Date: Tue, 10 May 2016 10:23:34 +0300
List-Id: Zsh Workers List <zsh-workers.zsh.org>

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