From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9209 invoked by alias); 11 Sep 2016 09:09:41 -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: 39275 Received: (qmail 17902 invoked from network); 11 Sep 2016 09:09:41 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.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(66.111.4.28):SA:0(0.0/5.0):. Processed in 0.406516 secs); 11 Sep 2016 09:09:41 -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=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=puPHQ7Pjs9rH89Byhe3nD3V0+x0=; b=1IHSVT QzLykSeKZoV1mEGWX7gxRhfmsLLqvG0mktHQ6Y2yVJf4DohrCvq2kRrswRMEk9ii 469g+0i5S8SQPBX0bbtWYghvjUaS0yy9zpeqnmBL2eV1oaGUNBIQjo8PLndZ4kvB DIsgQPZ/44Gs1/K92xBFZpd4Nt/DbSLkN2ODk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=puPHQ7Pjs9rH89Byhe3nD3V0+x0=; b=UnUPc ekujNo/RbjCJD06w2YVqhQGSCt3Y2dEKfK9xJ/7CUUhg0aPaOoPZ3Tgnhbd9h+rm VUQqOP/Ae1MvncXJkE7GrKweQ4d+cvUPTvFlyhXGIfIJOV5+oDcSriojxmLabqfp QtaieKdk91rmtU+0Li1MmMcJFGh0Bcl+pm4WYc= X-Sasl-enc: +a6+W71y3TubcmFd9puiEmVqrF68UHCVYL97uQ9ZAH0t 1473584969 Date: Sun, 11 Sep 2016 09:08:44 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: [PATCH] _virsh (Was: Re: zsh virsh completion) Message-ID: <20160911090844.GA22929@fujitsu.shahaf.local2> References: <20160720065832.GA28939@tarsus.local2> <699166a0-b0f0-452c-2561-b7e3cc952062@redhat.com> <25001.1469117569@hydra.kiddle.eu> <20160722071927.GG2521@tarsus.local2> <12554.1472678120@hydra.kiddle.eu> <20160902052342.GA8514@fujitsu.shahaf.local2> <66037.1472828529@hydra.kiddle.eu> <20160904040142.GA5216@fujitsu.shahaf.local2> <160906233901.ZM11422@torch.brasslantern.com> <85184.1473458985@hydra.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <85184.1473458985@hydra.kiddle.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Oliver Kiddle wrote on Sat, Sep 10, 2016 at 00:09:45 +0200: > @@ -13,10 +20,10 @@ if zstyle -s ":completion:${curcontext}:${1}" command tmp; then > if [[ "$tmp" = -* ]]; then > eval "$tmp[2,-1]" "$argv[2,-1]" Document somewhere that that _call_program -p overrides the 'command' style if the latter's value starts with a hyphen? > else > - eval "$tmp" > + eval $prefix "$tmp" > fi > else > - eval "$argv[2,-1]" > + eval $prefix "$argv[2,-1]" > fi 2>&$err_fd > +The standard variables are: > + > +startitem() > +item(tt(_comp_caller_options))( > +The completion system uses tt(setopt) to set a number of options. This > +allows functions to be written without concern for compatibility with > +every possible combination of user options. However, sometimes completion > +needs to know what the user's option preferences are. These are saved > +in the tt(_comp_caller_options) associative array. As I said in 39168: What are the keys and values of the array? Suggested text: The array maps option names, spelled in lowercase without underscores, to the string `tt(on)' or `tt(off)'. > +item(tt(_comp_priv_prefix))( > +Completion functions such as tt(_sudo) can set the tt(_comp_priv_prefix) > +array to a command that may then be used by tt(_call_program) to > +match the privileges when calling programs to generate matches. I suggeted in 39168 the following: s/command/prefix command/ in order to clarify to completion function authors what they should set $_comp_priv_prefix to. > +) Cheers, Daniel