From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5296 invoked by alias); 21 Jul 2016 12:32:34 -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: 38903 Received: (qmail 9992 invoked from network); 21 Jul 2016 12:32:34 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf0-f42.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.215.42):SA:0(-0.0/5.0):. Processed in 0.179987 secs); 21 Jul 2016 12:32:34 -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=SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: myllynen@redhat.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.215.42 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:reply-to:subject:references:to:cc:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=3g1NH8hJNTiAA95uJV+MLq80Foz+bfdKrdN/ETpFUiM=; b=gkGftx/2TQVxg6jH9HQyex/FyvfJSsDf5eHBdlB9NOEqyIZj+egmsu7gCjUZ7SE5c7 wOmVmjMa0QAonmzoPn4lPAwe+4QW5EGE03fB5SAK+ZcMYOgEEMOyjkNEwdeD6kbEoJa1 75CQTlHXVip2iRH7KM3qb7frkLozbt9GO0yhP7d2prg8bpWh73bx11mnqAFqjVcYNsOu ezssHKL4I1cnhbolDkMl+iLSHi4+t/uaKJUIV38saz0E6TAqwAhQvaWNR+UkN9mY1R6K tYaFm8Sx7v1XPyItyEt84Kc2CyAFi2iDXoiykiCV2C2I9VrU1HSKzZBtCF0CuyqmbiSO Dfhw== X-Gm-Message-State: ALyK8tKlrbmFJx2ly8vf08SWKwvCN4zqtf4jGWPSEK7HYcxTAKdPC1mhmsfkAsKtT9aGr9qh X-Received: by 10.25.21.16 with SMTP id l16mr21715155lfi.229.1469104340046; Thu, 21 Jul 2016 05:32:20 -0700 (PDT) Reply-To: Marko Myllynen Subject: Re: [PATCH] _virsh (Was: Re: zsh virsh completion) 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> <20160721065726.GD2467@tarsus.local2> To: Daniel Shahaf Cc: zsh-workers@zsh.org From: Marko Myllynen Organization: Red Hat Message-ID: <6c163098-a62d-a6a4-d6a4-62894dfee8de@redhat.com> Date: Thu, 21 Jul 2016 15:32:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20160721065726.GD2467@tarsus.local2> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi, On 2016-07-21 09:57, Daniel Shahaf wrote: > 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. Aha, no, it doesn't - yes that sounds very rare indeed, so much that I didn't even think of that scenario. > Could you suggest how to clarify the man page section I quoted? Perhaps change "with both -s and -w, -xy may be the option -x and the option -y with arguments still to come" to "... with arguments still to come for -x"? Thanks, -- Marko Myllynen