From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11465 invoked from network); 5 Jul 2007 15:33:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) 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.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Jul 2007 15:33:25 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 15754 invoked from network); 5 Jul 2007 15:33:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jul 2007 15:33:19 -0000 Received: (qmail 5608 invoked by alias); 5 Jul 2007 15:33:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23654 Received: (qmail 5599 invoked from network); 5 Jul 2007 15:33:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Jul 2007 15:33:15 -0000 Received: (qmail 15439 invoked from network); 5 Jul 2007 15:33:15 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 5 Jul 2007 15:33:09 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 998065C3C6; Thu, 5 Jul 2007 11:33:05 -0400 (EDT) Date: Thu, 5 Jul 2007 11:33:05 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Cc: "Bernhard R. Link" Subject: PATCH: _reprepro Message-ID: <20070705153305.GA32351@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk, "Bernhard R. Link" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) This completion function for reprepro is somewhat incomplete and somewhat incorrect. Bernhard, please send corrections. Index: Completion/Debian/Command/.distfiles =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/.distfiles,v retrieving revision 1.25 diff -u -r1.25 .distfiles --- Completion/Debian/Command/.distfiles 4 Feb 2007 02:42:59 -0000 1.25 +++ Completion/Debian/Command/.distfiles 5 Jul 2007 15:29:08 -0000 @@ -1,21 +1,13 @@ DISTFILES_SRC=' .distfiles -_a2utils -_apt _aptitude -_apt-file -_apt-move -_apt-show-versions _auto-apt _bts -_bug _dak -_dchroot _debchange -_dchroot-dsa -_debdiff _debfoster _debsign -_dlocate _dpkg _dpkg-cross -_dpkg_source _dput _dupload -_invoke-rc.d -_linda _lintian _madison -_make-kpkg _mergechanges _module-assistant -_piuparts _schroot _toolchain-source -_update-alternatives _update-rc.d _uscan -_wajig _wanna-build -_cdbs-edit-patch +_a2utils _dak _dpkg_source _piuparts +_apt _dchroot _dput _reprepro +_apt-file _dchroot-dsa _dupload _schroot +_aptitude _debchange _invoke-rc.d _toolchain-source +_apt-move _debdiff _linda _update-alternatives +_apt-show-versions _debfoster _lintian _update-rc.d +_auto-apt _debsign _madison _uscan +_bts _dlocate _make-kpkg _wajig +_bug _dpkg _mergechanges _wanna-build +_cdbs-edit-patch _dpkg-cross _module-assistant ' Index: Completion/Debian/Command/_reprepro =================================================================== RCS file: Completion/Debian/Command/_reprepro diff -N Completion/Debian/Command/_reprepro --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Completion/Debian/Command/_reprepro 5 Jul 2007 15:29:08 -0000 @@ -0,0 +1,70 @@ +#compdef reprepro + +local context state line distfile +typeset -A opt_args +local -a codenames + +_arguments \ + '(-h --help)'{-h,--help}'[display help]' \ + '*'{-v,-V,--verbose}'[be more verbose]' \ + '--silent[be less verbose]' \ + '(-b --basedir)'{-b,--basedir}':basedir:_files -/' \ + '--confdir:config dir:_files -/' \ + '--distdir:dist dir:_files -/' \ + '--logdir:log dir:_files -/' \ + '--overridedir:override dir:_files -/' \ + '--dbdir:db dir:_files -/' \ + '--listdir:list dir:_files -/' \ + '--methoddir:method dir:_files -/' \ + '(-C --component)'{-C,--component}':component:(component1 component2)' \ + '(-A --architecture)'{-A,--architecture}':architecture:(amd64 sparc)' \ + '(-T --type)'{-T,--type}':file type:(dsc deb udeb)' \ + '(-S --section)'{-S,--section}':section:(section1 section2)' \ + '(-P --priority)'{-P,--priority}':priority:(high low)' \ + '--export=:whether and how:(never changed normal force)' \ + '--ignore=:error type:(what otherwhat)' \ + '--nolistsdownload[do not download Release or index files]' \ + '--keepunreferencedfiles[do not delete files that are no longer used]' \ + '--keepunneededlists' \ + '--keepdirectories' \ + '--ask-passphrase' \ + '--noskipold' \ + '--waitforlock:count:' \ + '--spacecheck:behavior:(full none)' \ + '--dbsafetymargin:bytes count:' \ + '--safetymargin:bytes count:' \ + '--noguessgpgtty' \ + ':reprepro command:(export createsymlinks list listfilter remove update + iteratedupdate checkupdate predelete pull checkpull includedeb + includeudeb includedsc include processincoming check checkpool + rereference dumpreferences dumpunreferenced deleteunreferenced + reoverride dumptracks retrack removealltracks removetrack tidytracks + copy clearvanished gensnapshot rerunnotifiers)' \ + '*::subcmd:->subcmd' && return 0 + +case "$state" in + (subcmd) + + case "$words[1]" in + (export|update|iteratedupdate|checkupdate|predelete|pull|checkpull|check) + if [[ -n "$opt_args[--confdir]" ]]; then + distfile=${opt_args[--confdir]}/distributions + elif [[ -n "$opt_args[-b]" ]]; then + distfile=${opt_args[-b]}/conf/distributions + elif [[ -n "$opt_args[--basedir]" ]]; then + distfile=${opt_args[--basedir]}/conf/distributions + elif [[ -n "$REPREPRO_BASE_DIR" ]]; then + distfile=${REPREPRO_BASE_DIR}/conf/distributions + else + distfile=$PWD/conf/distributions + fi + + codenames=($(awk '/^[Cc][Oo][Dd][Ee][Nn][Aa][Mm][Ee]: / {$1="";print}' "$distfile")) + _wanted -V 'codenames' expl 'codename' compadd -a codenames + ;; + (*) + _files + ;; + esac + ;; +esac