From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9063 invoked from network); 24 May 2009 07:42:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 24 May 2009 07:42:50 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 24920 invoked from network); 24 May 2009 07:42:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 May 2009 07:42:42 -0000 Received: (qmail 5956 invoked by alias); 24 May 2009 07:42:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26988 Received: (qmail 5943 invoked from network); 24 May 2009 07:42:36 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 24 May 2009 07:42:36 -0000 Received: from vms173005pub.verizon.net (vms173005pub.verizon.net [206.46.173.5]) by bifrost.dotsrc.org (Postfix) with ESMTP id CC59A8027106 for ; Sun, 24 May 2009 09:42:20 +0200 (CEST) Received: from torch.brasslantern.com ([96.249.201.13]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KK5001SM1E4OLJ8@vms173005.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 24 May 2009 02:42:09 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id n4O7g2Fh020468; Sun, 24 May 2009 00:42:03 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n4O7g2kV020467; Sun, 24 May 2009 00:42:02 -0700 From: Bart Schaefer Message-id: <090524004202.ZM20466@torch.brasslantern.com> Date: Sun, 24 May 2009 00:42:02 -0700 In-reply-to: <153994.78930.qm@web37305.mail.mud.yahoo.com> Comments: In reply to Michael Hwang "Completion for pgrep and pkill" (May 23, 10:29pm) References: <153994.78930.qm@web37305.mail.mud.yahoo.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Michael Hwang , zsh-workers@sunsite.dk Subject: Re: Completion for pgrep and pkill MIME-version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.94.2/9385/Sun May 24 03:50:55 2009 on bifrost X-Virus-Status: Clean On May 23, 10:29pm, Michael Hwang wrote: } } The completion relies on ps, which I know takes arguments differently } on different platforms. Without any cross-platform experience, I can't } say whether or not the completion will work properly on a non-GNU } system. Someone might need to go through and change it to be more } portable. This is typically addressed by using zstyle for the "command" style to allow the user to specify the program that will be used. Look at the _killall and _pids completers for examples of the use of _call_program, and the documentation for the command style and for the processes and process-names tags. In this case you might have several contexts -- one for each of the ps commands needed to produce the sid, ppid, pgid, etc. -- or you might construct a single "ps" command that returns all the needed information and then parse the output with zsh to extract the subset for each case.