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 out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from <d.s@daniel.shahaf.name>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(66.111.4.29):SA:0(0.0/5.0):. 
 Processed in 0.1544 secs); 21 Jul 2016 07:09:31 -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=0.0 required=5.0 tests=T_DKIM_INVALID
	autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: d.s@daniel.shahaf.name
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
	daniel.shahaf.name; h=cc:content-transfer-encoding:content-type
	:date:from:in-reply-to:message-id:mime-version:references
	:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=hx5MoVFPbJSB8Dov
	0InsSAC46cM=; b=R0qjc3lJO8HoaZ2zITkfFNHHF+Xe22PcSCo0buLN+TzQbgrI
	x33+bLtqkrZPmgf4M/7vbqOWzzLIeA/cxknk9qIczrH1JmI8tusHTMFSVssBp2Ce
	sfISNPiytl7lVOg+PZ70ASg32Cb2ULcyylDNj9e6093JZrj09BzqVZEZ1Tw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:content-transfer-encoding:content-type
	:date:from:in-reply-to:message-id:mime-version:references
	:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=hx5MoVFPbJSB8Do
	v0InsSAC46cM=; b=D7J7e/lLlPQDqewxzCRahfbPRBS51diNmWBzAx0Tu4zxDPy
	ccJK6ji6QxrJb3OKTKdtiO214tDuCnhiDnuOXEIo1OVrhQi029f4l7TOjT8Zxpod
	UfU4CkScNQ4YTTECtKUt1bBZtH4s3dxqT2INRxKgRJN7zq+w0y+PSBniY76A=
X-Sasl-enc: mYAAx0mSH2yGRkuWS8E80qDJW+6QpkO+IcEs7ectyaNb 1469084248
Date: Thu, 21 Jul 2016 06:57:26 +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: <20160721065726.GD2467@tarsus.local2>
References: <8eb6dce0-50d7-5ab2-503a-194c1de2e45d@redhat.com>
 <20160713045957.GA3893@tarsus.local2>
 <9968da53-c1fd-fa2a-f30c-c74f884d2478@redhat.com>
 <20160720065832.GA28939@tarsus.local2>
 <699166a0-b0f0-452c-2561-b7e3cc952062@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <699166a0-b0f0-452c-2561-b7e3cc952062@redhat.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Seq: zsh-workers 38902

Marko Myllynen wrote on Wed, Jul 20, 2016 at 11:36:36 +0300:
> On 2016-07-20 09:58, Daniel Shahaf wrote:
> > Marko Myllynen wrote on Mon, Jul 18, 2016 at 15:06:52 +0300:
> >> +        _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)
> 
> I mentioned that virsh accepts all the following: -r -d 0, -r -d0, -rd
> 0, or -rd0. So to me it would seem that -s -w is correct here, right?

All these require only -s [without -w].

Does virsh accept «-dr 0» where the 0 is argument to -d [regardless of
whether -r takes an argument]?  _That_'s what -w is about.

Could you suggest how to clarify the man page section I quoted?

Cheers,

Daniel

