From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5389 invoked by alias); 27 May 2018 08:54:05 -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: 42867 Received: (qmail 28324 invoked by uid 1010); 27 May 2018 08:54:05 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr0-f181.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.128.181):SA:0(-3.7/5.0):. Processed in 2.021569 secs); 27 May 2018 08:54:05 -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=-3.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: doron.behar@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SEyYPIf9czbyS30qSnNgg1BE5ZYq6RbsdgvrGoF/+us=; b=uenHMdQU68K9KoyftLxf+Ws1dehFiA3qHVAAZnrjoHJgy8fdfgODvIWYXoyGPvAH/y zUo4E5bN3iXIkviFiNCPy39Z7Sopt8hI4qgLRb7aANM4/qBLRuMw5uvjnFe5Vr2k4o+n BXxh4DzAdaiws3/h1IIcGvXVfH0x88WT6ppWplVeXT+uzoOFhVZXQY2OQHZv4rnAx+k/ kuUjDb9ZtTTa6dG1Eco1ig+4tX7KLsRwqAmf/07g6ha95kQW6OBoCv/bC/yBuGU8VFKx g9BGTeXYQsed8MeLbRrfCbfMO7sLGCAfs41G4Jj5ZIGXiWJTSg/nHZPVPIfyHxD0UyEZ 3a3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=SEyYPIf9czbyS30qSnNgg1BE5ZYq6RbsdgvrGoF/+us=; b=HaK+Q+/XYD36+j66esmhgOu57kZEFbf/7ElISa0bijKpph9YExzHM5ECnLKj9iVrI8 zzdhvEBZfk92jeaSjDsOk4t6B65rt3o9Y+B2FyQwuxup1/h8i55kPGDbtSGKN/XcGErQ Hrh+qFB1lI+lccvWJw5ikPL9geJimahW8ZrFpEQBp2IrOSWcdGUAEKhZ61Pb4O7cqZ9w 43UdOxGvfFdVkrJXAY+jupvis25wQ7slvqmotSeXxgrPhJ4kkgC1BX93BhC/bc79aMVD MBkeZ3/7QUqJoEzqX4JfcCigIigZq6PeRYEshehxsefm/BpYifemcI2IuHQDg4ws33xG Tr2w== X-Gm-Message-State: ALKqPwewAfM4uqPwwd2jPzCchBfmTK2SlE8uvNRAE8wAPcjaokeifQ+0 oYj0/I07QBtwibXJmHEQV15gzKU0 X-Google-Smtp-Source: AB8JxZpW5qKa0Ig2kAL3UaLVI0cwiz8puWpyifvwry1pqUle45WNplFZjmoHpymDS2UAYPc+PzJjIw== X-Received: by 2002:adf:f74c:: with SMTP id z12-v6mr7706687wrp.165.1527411239515; Sun, 27 May 2018 01:53:59 -0700 (PDT) Date: Sun, 27 May 2018 11:53:57 +0300 From: Doron Behar To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: Completion: How to emulate what this zstyle does natuarlly in a completion function? Message-ID: <20180527085357.fvadumofwhhjgpau@NUC.doronbehar.com> Mail-Followup-To: Bart Schaefer , zsh-workers@zsh.org References: <20180526070525.xx56q6ilizmslqf6@NUC.doronbehar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180512 Thanks for your reply Bart, I tried using `_pids` but it completes pids of processes only in the current tty. How to I make complete all the processes the user has? On Sat, May 26, 2018 at 08:45:10PM -0700, Bart Schaefer wrote: > 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.