Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from hermes.apache.org by f.primenet.com.au (envelope-from <danielsh@apache.org>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(140.211.11.3):SA:0(-1.3/5.0):. 
 Processed in 0.119059 secs); 20 Jul 2016 07:05:15 -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.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
	RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: danielsh@apache.org
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: none (ns1.primenet.com.au: domain at apache.org does not designate permitted sender hosts)
Date: Wed, 20 Jul 2016 06:58:32 +0000
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Marko Myllynen <myllynen@redhat.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] _virsh  (Was: Re: zsh virsh completion)
Message-ID: <20160720065832.GA28939@tarsus.local2>
References: <8eb6dce0-50d7-5ab2-503a-194c1de2e45d@redhat.com>
 <20160713045957.GA3893@tarsus.local2>
 <9968da53-c1fd-fa2a-f30c-c74f884d2478@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <9968da53-c1fd-fa2a-f30c-c74f884d2478@redhat.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Seq: zsh-workers 38891

Resubjecting to draw attention to your patch.

I haven't done a full review, but I did spot a couple of trivial issues:

Marko Myllynen wrote on Mon, Jul 18, 2016 at 15:06:52 +0300:
>  case $service in
>    virsh)
>      if (( ! $+_cache_virsh_cmds )); then
>        _cache_virsh_cmds=( ${${${${(f):-"$(_call_program options virsh help)"}:#*:}/# ##}/ *} )
> +      for icmd in $interact_cmds; do

Need to declare $icmd local.

> +        _cache_virsh_cmds[$_cache_virsh_cmds[(i)$icmd]]=()
> +      done
>      fi
>      if (( ! $+_cache_virsh_cmdopts )); then
>        typeset -gA _cache_virsh_cmdopts
>      fi
>      _arguments -A "-*" -C -S -s -w \

Oliver remarked on the -w earlier, are you quite sure it's correct?

              -w     In combination with -s, allow option stacking even if one
                     or more of the options take arguments.  For example, if
                     -x takes an argument, with no -s, `-xy' is considered as
                     a single (unhandled) option; with -s, -xy is an option
                     with the argument `y'; with both -s and -w, -xy may be
                     the option -x and the option -y with arguments still to
                     come.

(-s and -w are options to _arguments, -xy is a word on the command line
being completed)

> -      '(-c --connect)'{-c+,--connect}'[specify connection URI]:URI:_hosts' \

Should be {-c+,--connect=} with an equals sign?

Cheers,

Daniel

