From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16879 invoked from network); 6 Jan 2008 20:15:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) 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.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Jan 2008 20:15:10 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 73215 invoked from network); 6 Jan 2008 20:15:03 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Jan 2008 20:15:03 -0000 Received: (qmail 24120 invoked by alias); 6 Jan 2008 20:14:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24365 Received: (qmail 24107 invoked from network); 6 Jan 2008 20:14:58 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 6 Jan 2008 20:14:58 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id 07F6A8058FF2 for ; Sun, 6 Jan 2008 21:14:57 +0100 (CET) Received: from acolyte.scowler.net (acolyte.scowler.net [216.254.112.45]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Sun, 6 Jan 2008 21:14:56 +0100 (CET) Received: by acolyte.scowler.net (Postfix, from userid 1000) id 1F44E5D0C8; Sun, 6 Jan 2008 15:14:53 -0500 (EST) Date: Sun, 6 Jan 2008 15:14:54 -0500 From: Clint Adams To: Chris Lamb , 459455@bugs.debian.org Cc: zsh-workers@sunsite.dk Subject: Re: Bug#459455: Completion for vim-addons Message-ID: <20080106201454.GA13272@scowler.net> Mail-Followup-To: Chris Lamb , 459455@bugs.debian.org, zsh-workers@sunsite.dk References: <20080106171544.5fca488d@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080106171544.5fca488d@localhost.localdomain> User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: ClamAV using ClamSMTP On Sun, Jan 06, 2008 at 05:15:44PM +0000, Chris Lamb wrote: > Attached is a Zsh completion script for Stefano Zacchiroli's "vim-addons" > script that is shipped with Debian's "vim-addon-manager" package. Committing to CVS. Index: Completion/Debian/Command/_vim-addons =================================================================== RCS file: Completion/Debian/Command/_vim-addons diff -N Completion/Debian/Command/_vim-addons --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Completion/Debian/Command/_vim-addons 6 Jan 2008 20:11:07 -0000 @@ -0,0 +1,50 @@ +#compdef vim-addons + +local state line cmds ret=1 +typeset -A opt_args + +_arguments -C \ + {-q,--query}'[be quiet and make the output more parseable]' \ + {-r,--registry-dir}'[set the registry directory]' \ + {-s,--source-dir}'[set addon source directory]' \ + {-t,--target-dir}'[set addon target directory]' \ + {-v,--verbose}'[increase verbosity]' \ + {-y,--system-dir}'[set system-wide target directory]' \ + {-h,--help}'[help]' \ + {-w,--system-wide}'[set target directory to the system-wide one (overrides -t)]' \ + '1: :->cmds' \ + '*: :->args' && ret=0 + +case $state in + cmds) + cmds=( + 'install:install the specified addon' + 'remove:remove the specified addon' + 'list:list available addons in registry' + 'status:list the status of addons' + 'disable:disable the specified addons' + 'amend:under the effects of the previous disable' + 'files:list the files composing the specified addon' + 'show:display detailed information about the specified addon' + ) + _describe -t commands 'vim-addons command' cmds && ret=0 + ;; + args) + case $line[1] in + install) + _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 == "removed" { print $1 }') && ret=0 + ;; + amend) + _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 == "disabled" { print $1 }') && ret=0 + ;; + remove) + _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 ~ /disabled|installed/ { print $1 }') && ret=0 + ;; + files|status|disable|show) + _wanted addon expl 'addon' compadd $(command vim-addons list) && ret=0 + ;; + esac + ;; +esac + +return ret