From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9627 invoked from network); 30 Jan 2009 16:25:39 -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.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Jan 2009 16:25:39 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 67054 invoked from network); 30 Jan 2009 16:25:33 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Jan 2009 16:25:33 -0000 Received: (qmail 10463 invoked by alias); 30 Jan 2009 16:25:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26494 Received: (qmail 10452 invoked from network); 30 Jan 2009 16:25:29 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Jan 2009 16:25:29 -0000 Received: from cork.scru.org (cork.scru.org [209.20.67.2]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 3D91880271F0 for ; Fri, 30 Jan 2009 17:25:25 +0100 (CET) Received: by cork.scru.org (Postfix, from userid 1000) id 1CD831040D7; Fri, 30 Jan 2009 16:25:23 +0000 (UTC) Date: Fri, 30 Jan 2009 16:25:22 +0000 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: _pydoc Message-ID: <20090130162522.GA24901@scru.org> Mail-Followup-To: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/8924/Fri Jan 30 16:10:48 2009 on bifrost X-Virus-Status: Clean I didn't include modules because "pydoc modules" spouts a lot of garbage on my system and I didn't care enough to find out why. Index: Completion/Unix/Command/_pydoc =================================================================== RCS file: Completion/Unix/Command/_pydoc diff -N Completion/Unix/Command/_pydoc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Completion/Unix/Command/_pydoc 30 Jan 2009 16:24:16 -0000 @@ -0,0 +1,16 @@ +#compdef pydoc + +local context state line +typeset -A opt_args + +_arguments \ + '-k[keyword]:keyword:' \ + '-p[port]:port:_ports' \ + '-g[gui]' \ + '-w[write out HTML]:file or dir:_files' \ + ':keyword, topic, module, package, or dotted reference:->lookup' && return 0 + +_alternative \ + 'keywords:keyword:compadd ${=${${(f)"$(pydoc keywords)"}[2,-1]}}' \ + 'topics:topic:compadd ${=${${(f)"$(pydoc topics)"}[2,-1]}}' \ + 'modules:module:'