From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27045 invoked by alias); 10 May 2016 07:51:38 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38458 Received: (qmail 25942 invoked from network); 10 May 2016 07:51:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:reply-to:to:from:subject:organization:message-id :date:user-agent:mime-version:content-transfer-encoding; bh=Zu/KPWAT3s+z+opy5e6PNkdUfsrdIAa5vnxoHG5MGXk=; b=ND3pCHpXuYullsX3NuxhcQMFIrriO+hQ4e3YGHAjq+IjVpi/r2xLSSZyDeVnf8CORR b17Y9Mr2YPs1fj2MQ8FZzDN/8iCNUGfoJQ/jlTQw7Z+TOYGNXJ8Z69SJoYlmhQod77C8 ndrESIZRFVPZHgZ6g1EWZPNNWvxQplM1s2VFrUkppbmoiDTy5DhuBXeyaZeMMhxkmvwU Ug5zaKpAify5ZUWuiT+55Kf+EO5rgwg6CMZekzdyPpJmrsUym3IxqmjDlLD6O4LtNP9v la+qdJAN3BJ45i487h+TqVWaR87K7T+caMpvluu30/4zsJQWcaVN4KP3X8OHdhUBXXyG PZag== X-Gm-Message-State: AOPr4FXgOE5gm397Ex9l+ZNRGNhmfZYYft0iP+RKcwDJ3HJCwT2sJ5MyOD+GhGdjjHfQGahQ X-Received: by 10.195.11.106 with SMTP id eh10mr42288753wjd.130.1462865016739; Tue, 10 May 2016 00:23:36 -0700 (PDT) Reply-To: Marko Myllynen To: zsh-workers@zsh.org From: Marko Myllynen Subject: zsh _multi_parts patch and question Organization: Red Hat Message-ID: <57318C76.4030509@redhat.com> Date: Tue, 10 May 2016 10:23:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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