From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7721 invoked from network); 12 Jul 2005 06:12:52 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Jul 2005 06:12:52 -0000 Received: (qmail 38066 invoked from network); 12 Jul 2005 06:12:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Jul 2005 06:12:46 -0000 Received: (qmail 28706 invoked by alias); 12 Jul 2005 06:12:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21446 Received: (qmail 28696 invoked from network); 12 Jul 2005 06:12:43 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Jul 2005 06:12:43 -0000 Received: (qmail 37622 invoked from network); 12 Jul 2005 06:12:43 -0000 Received: from mail-ihug.icp-qv1-irony2.iinet.net.au (HELO ihug-mail.icp-qv1-irony2.iinet.net.au) (203.59.1.196) by a.mx.sunsite.dk with SMTP; 12 Jul 2005 06:12:39 -0000 Received: from 203-206-249-182.dyn.iinet.net.au (HELO localhost.localdomain) (203.206.249.182) by ihug-mail.icp-qv1-irony2.iinet.net.au with ESMTP; 12 Jul 2005 14:12:18 +0800 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== X-IronPort-AV: i="3.93,280,1114963200"; d="scan'208"; a="16041107:sNHT15901928" Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id j6C65dNa012825 for ; Tue, 12 Jul 2005 16:05:52 +1000 Received: (from doug@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id j6C65QJC012814 for zsh-workers@sunsite.dk; Tue, 12 Jul 2005 16:05:26 +1000 X-Authentication-Warning: localhost.localdomain: doug set sender to dougkearns@gmail.com using -f Date: Tue, 12 Jul 2005 16:05:26 +1000 From: Doug Kearns To: zsh-workers@sunsite.dk Subject: Re: PATCH: new rake completion Message-ID: <20050712060526.GA12661@localhost.localdomain> Mail-Followup-To: zsh-workers@sunsite.dk References: <20050711181045.GA2218@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050711181045.GA2218@localhost.localdomain> User-Agent: Mutt/1.4i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Tue, Jul 12, 2005 at 04:10:45AM +1000, Doug Kearns wrote: > Here's a start on rake completion... Mostly complete now... Regards, Doug Index: Completion/Unix/Command/_rake =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rake,v retrieving revision 1.1 diff -u -r1.1 _rake --- Completion/Unix/Command/_rake 11 Jul 2005 18:33:02 -0000 1.1 +++ Completion/Unix/Command/_rake 12 Jul 2005 06:08:13 -0000 @@ -5,32 +5,32 @@ local curcontext="$curcontext" state line ret=1 typeset -A opt_args -_arguments -C \ +_arguments -C -S \ '(--dry-run -n)'{--dry-run,-n}'[do a dry run without executing actions]' \ '(- *)'{--help,-H}'[display help information]' \ - '(--libdir -I)'{--libdir,-I}'[include specified directory in the search path for required modules]:library directory:_files -/' \ + \*{--libdir,-I}'[include specified directory in the search path for required modules]:library directory:_files -/' \ '(--nosearch -N)'{--nosearch,-N}'[do not search parent directories for the Rakefile]' \ - '(--prereqs -P)'{--prereqs,-P}'[display the tasks and prerequisites, then exit]' \ - '(--quiet -q --silent -s)'{--quiet,-q}'[do not log messages to standard output]' \ + '(- *)'{--prereqs,-P}'[display the tasks and prerequisites, then exit]' \ + '(--quiet -q --silent -s --verbose -v)'{--quiet,-q}'[do not log messages to standard output]' \ '(--rakefile -f)'{--rakefile,-f}'[use specified file as the rakefile]:rake file:_files' \ - '(--require -r)'{--require,-r}'[require specified module before executing rakefile]' \ - '(--silent -s --quiet -q)'{--silent,-s}"[like --quiet, but also suppresses the 'in directory' announcement]" \ - '(--tasks -T)'{--tasks,-T}'[display the tasks and dependencies, then exit]' \ + \*{--require,-r}'[require specified module before executing rakefile]:library:->library' \ + '(--quiet -q --silent -s --verbose -v)'{--silent,-s}"[like --quiet, but also suppresses the 'in directory' announcement]" \ + '(- *)'{--tasks,-T}'[display the tasks and dependencies, then exit]' \ '(--trace -t)'{--trace,-t}'[turn on invoke/execute tracing, enable full backtrace]' \ - '(--usage -h)'{--usage,-h}'[display usage information]' \ - '(--verbose -v)'{--verbose,-v}'[log message to standard output (default)]' \ + '(- *)'{--usage,-h}'[display usage information]' \ + '(--quiet -q --silent -s --verbose -v)'{--verbose,-v}'[log message to standard output (default)]' \ '(- *)'{--version,-V}'[display version information]' \ '*:target:->target' && ret=0 case "$state" in library) local -a dirs - dirs=( $(_call_program directories ruby -e 'puts\ $:' 2>/dev/null) ) + dirs=( $(_call_program directories ruby -e 'puts\ $:' 2>/dev/null) ${(s.:.)opt_args[-I]} ) _wanted libraries expl library _path_files -W dirs && ret=0 ;; target) local -a targets - targets=( ${${(f)"$(_call_program targets $words[1] -sT 2>/dev/null)"}/(#b)rake ([^ ]##) ##\# (*)/$match[1]:${match[2]:l}} ) + targets=( ${${(f)"$(_call_program targets $words[1] -sT $opt_args[(I)(-N|--nosearch)] ${(kv)opt_args[(I)(-f|--rakefile)]} 2>/dev/null)"}/(#b)rake ([^ ]##) ##\# (*)/$match[1]:${match[2]:l}} ) if (( ! ${targets[(I)rake aborted!]} )) then _describe -t targets 'rake target' targets && ret=0 else