From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8605 invoked by alias); 27 May 2018 03:45:17 -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: List-Unsubscribe: X-Seq: 42861 Received: (qmail 7457 invoked by uid 1010); 27 May 2018 03:45:17 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f50.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(74.125.82.50):SA:0(-1.9/5.0):. Processed in 1.635949 secs); 27 May 2018 03:45:17 -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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIMWL_WL_MED,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2+ed5S5tPdYs0UP/hzCctcxj4D44Jtm/4V7ir9ZPRpo=; b=llDrSgWppoF/nLLov7p2QUb0f60U5k5fVSMYlGfV5M/CqJc1jDv82n2MvV1enL72Y4 wBPMQx4m4bzYNLqt+dYLCoU67J7i9QFgytp60yebwQ21CG6T+AtzOfnctR0R3MCxYocT W3XUehyVsf9I6GvswH7JiKdoNugyI5yP23XWYR0+3K0fpi1pMcMZwNxzFTgmyPx5O34+ HMMVDphZSVeH4A5qKmexAtE/oRFw0cxqzEF+mGqWDMFQ4qi+xLw9nDhu0UScnNGrCgUF j0+NQHlOR93RmlXQz/Wc3VJBqAJYfxDxP92g2c/o4dXP4jX9VMzxEqRRFgXzGR3Dltzq BgtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=2+ed5S5tPdYs0UP/hzCctcxj4D44Jtm/4V7ir9ZPRpo=; b=bv7GlFd5JzNMmKtMsYxK6gHjOJ0jffu8342btbyxoTjB4G0uigMlCJZlXmpzyB9QDN L516RLtKIugHOqn0/J7Y9hDFswWC+uY53+ZRH/eO/L0m83r6voRQBnnif1ellE7iG8zD /Isqs+xtnZn28nE8Gfr1wpYG3LkPyAxyaOlL0CBu9TmZZKxjfgmDHYYpZ3DMEryeVPPh Uj1hZ8uy+ep6KGPaDKaJ60yKqn3EqDkI02M+5hU8nG2CQDhsHAwmhBxGA4KU7xssBebq pg+Jqkkyy2m4jKjz2xX8ERWb0vkua28F7AR6yrEsj2rKDc5BVrWYhzyUgykT259TGVof nC7A== X-Gm-Message-State: ALKqPwe5roiVj3583M0HwLr6fw2c07UcHi7X4fR2FTf+BHfF8LExNJFW E7kWjsn4wU1tIuwLlcODGrRfLOvjw6I+ymhinVV3Xg== X-Google-Smtp-Source: ADUXVKIH8mnq59hLf0TSrKi3HxspJGN0Sgi0Z3eTE/Ba6zoJbAi/+mqJq7sAlterx6J1hFBPukZX1sFt3kyX81yGI7s= X-Received: by 2002:a2e:2f07:: with SMTP id v7-v6mr5330445ljv.113.1527392711583; Sat, 26 May 2018 20:45:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180526070525.xx56q6ilizmslqf6@NUC.doronbehar.com> References: <20180526070525.xx56q6ilizmslqf6@NUC.doronbehar.com> From: Bart Schaefer Date: Sat, 26 May 2018 20:45:10 -0700 Message-ID: Subject: Re: Completion: How to emulate what this zstyle does natuarlly in a completion function? To: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" On Sat, May 26, 2018 at 12:05 AM, Doron Behar wrote: > > My question is: How do I emulate a completion like that naturally within > a completion function? I want a certain command's option argument > completion to suggest all processes the current user just like when I > try to complete `kill`. You want to call the _pids helper function from that command's completion function. _pids will use the current context to look up the command to use to generate the list of possible process IDs.