From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2020 invoked from network); 17 Apr 2005 18:47:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Apr 2005 18:47:04 -0000 Received: (qmail 32110 invoked from network); 17 Apr 2005 18:46:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Apr 2005 18:46:58 -0000 Received: (qmail 28246 invoked by alias); 17 Apr 2005 18:46:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21153 Received: (qmail 28236 invoked from network); 17 Apr 2005 18:46:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 17 Apr 2005 18:46:55 -0000 Received: (qmail 31767 invoked from network); 17 Apr 2005 18:46:55 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 17 Apr 2005 18:46:51 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id A9B527001A; Sun, 17 Apr 2005 14:46:49 -0400 (EDT) Date: Sun, 17 Apr 2005 14:46:49 -0400 From: Clint Adams To: Stephen Rueger Cc: zsh-workers@sunsite.dk Subject: Re: PATCH: _module-assistant Message-ID: <20050417184649.GA28637@scowler.net> Mail-Followup-To: Stephen Rueger , zsh-workers@sunsite.dk References: <20050417161535.GA31655@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-1.9 required=6.0 tests=AWL,BAYES_00, SUBJ_HAS_UNIQ_ID autolearn=no version=3.0.2 X-Spam-Hits: -1.9 > Please incorporate whatever you want from my version of _module-assistant Great, thanks for sharing. This should combine all the features except the completion of "all" or "alli" if any of the appropriate subcommands are on the line. Index: Completion/Debian/Command/_module-assistant =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_module-assistant,v retrieving revision 1.1 diff -u -r1.1 _module-assistant --- Completion/Debian/Command/_module-assistant 17 Apr 2005 16:17:52 -0000 1.1 +++ Completion/Debian/Command/_module-assistant 17 Apr 2005 18:43:30 -0000 @@ -1,6 +1,26 @@ #compdef module-assistant m-a -_arguments \ +typeset -a _module_assistant_commands + +_module_assistant_commands=( + "update[synchronize version index files]" + "prepare[install required kernel headers package]" + "fakesource[install required kernel source package]" + "list[a print a list of details about available packages]" + "list-available[b print a list of details about available packages ]" + "la[c print a list of details about available packages ]" + "list-installed[ print a list of details about installed packages ]" + "li[print a list of details about installed packages ]" + "search[search for packages]" + "get[install specified source package]" + "build[build specified packages]" + "install[install specified packages]" + "auto-install[do all necessary steps to install specified packages]" + "clean[clear build directories of the kernel packages]" + "purge[clear cache and remove all binary packages of source package]" +) + +_arguments -A \ '(-h --help)'{-h,--help}'[print help screen]' \ '(-v --verbose)'{-v,--verbose}'[Be verbose, show full paths, etc.]' \ '(-q --quiet)'{-q,--quiet}'[The opposite of verbose]' \ @@ -12,6 +32,6 @@ '(-l --kvers-list)'{-l,--kvers-list}'[List of kernel versions to work on (default: current version)]:kernel version list:' \ '(-k --kernel-dir)'{-k,--kernel-dir}'[List of kernel headers/source directories, comma separated]:list of dirs:_files -/' \ '(-t --text-mode)'{-t,--text-mode}'[no progress bars]' \ - '1:list of commands:_values -s , subcommands update get build list install auto-install prepare clean purge' \ - '*:packages: compadd ${${${$(ls /usr/src/modass/var_cache_modass/*.avail_version)}:t}%.avail_version}' + '1:list of commands:_values -s , subcommands "${_module_assistant_commands[@]}"' \ + '*:packages: compadd /usr/src/modass/var_cache_modass/*.avail_version(N:t:r) /var/cache/modass/*.avail_version(N:t:r)'