From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28270 invoked from network); 28 Jul 2005 07:09:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Jul 2005 07:09:50 -0000 Received: (qmail 52064 invoked from network); 28 Jul 2005 07:09:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Jul 2005 07:09:44 -0000 Received: (qmail 29299 invoked by alias); 28 Jul 2005 07:09:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21540 Received: (qmail 29289 invoked from network); 28 Jul 2005 07:09:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Jul 2005 07:09:41 -0000 Received: (qmail 51784 invoked from network); 28 Jul 2005 07:09:41 -0000 Received: from mail-ihug.icp-qv1-irony1.iinet.net.au (203.59.1.195) by a.mx.sunsite.dk with SMTP; 28 Jul 2005 07:09:36 -0000 Received: from 202-161-3-246.dyn.iinet.net.au (HELO localhost.localdomain) (202.161.3.246) by mail-ihug.icp-qv1-irony1.iinet.net.au with ESMTP; 28 Jul 2005 15:09:18 +0800 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== X-IronPort-AV: i="3.95,148,1120406400"; d="scan'208"; a="31284427:sNHT16437688" Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.13.4/8.12.8) with ESMTP id j6S71va5012315 for ; Thu, 28 Jul 2005 17:02:10 +1000 Received: (from doug@localhost) by localhost.localdomain (8.13.4/8.13.4/Submit) id j6S71mhL012312 for zsh-workers@sunsite.dk; Thu, 28 Jul 2005 17:01:48 +1000 X-Authentication-Warning: localhost.localdomain: doug set sender to dougkearns@gmail.com using -f Date: Thu, 28 Jul 2005 17:01:47 +1000 From: Doug Kearns To: zsh-workers@sunsite.dk Subject: PATCH: aap 1.076 completion update Message-ID: <20050728070147.GA10623@localhost.localdomain> 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.4.2.1i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.4 This updates aap completion for version 1.076 and brings target completion into line with that of the other build programs. Regards, Doug Index: Completion/Unix/Command/_aap =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_aap,v retrieving revision 1.4 diff -u -r1.4 _aap --- Completion/Unix/Command/_aap 26 Apr 2004 13:47:10 -0000 1.4 +++ Completion/Unix/Command/_aap 28 Jul 2005 07:03:03 -0000 @@ -1,15 +1,15 @@ #compdef aap -# A-A-P recipe executive version 1.001; released 2003 Jul 05 20:44:44 GMT +# A-A-P recipe executive version 1.076; released 2005 May 30 12:47:03 GMT local curcontext="$curcontext" state line ret=1 typeset -A opt_args -_arguments \ +_arguments -C -s -S \ '(- *)'{-V,--version}'[print version information and exit]' \ '(- *)'{-h,--help}'[print help information and exit]' \ - '(-v --verbose)'{-v,--verbose}'[print more information]' \ - '(-s --silent)'{-s,--silent}'[print less information]' \ + '(-s --silent -v --verbose)'{-v,--verbose}'[print more information]' \ + '(-v --verbose -s --silent)'{-s,--silent}'[print less information]' \ '(-d --debug)'{-d,--debug=}'[debug the specified items]:flags:' \ '--profile=[profile A-A-P execution and write results in specified file]:output file:_files' \ '(-n --nobuild)'{-n,--nobuild}'[print the build commands but do not execute them]' \ @@ -20,25 +20,30 @@ \*{-c,--command=}'[execute a command after reading the recipe]:aap command:' \ '(-k --continue)'{-k,--continue}'[continue building after an error]' \ '(-S --stop)'{-S,--stop}'[stop building at first error (default)]' \ - '(-R --fetch-recipe)'{-R,--fetch-recipe}'[fetch recipe file and child recipes]' \ - '(-N --nofetch-recipe)'{-N,--nofetch-recipe}'[do not fetch recipes for "fetch" target]' \ + '(-N,--nofetch-recipe -R --fetch-recipe)'{-R,--fetch-recipe}'[fetch recipe file and child recipes]' \ + '(-R --fetch-recipe -N --nofetch-recipe)'{-N,--nofetch-recipe}'[do not fetch recipes for "fetch" target]' \ '(-a --nocache)'{-a,--nocache}"[always download files, don't use the cache]" \ '(-l --local)'{-l,--local}'[do not recurse into subdirectories]' \ '(-j --jobs)'{-j,--jobs=}'[maximum number of parallel jobs]:number of jobs:' \ - '(-u --search-up --up)'{-u,--search-up,--up}'[search directory tree upwards for main.aap recipe]' \ + '(-f --recipe -u --search-up --up)'{-u,--search-up,--up}'[search directory tree upwards for main.aap recipe]' \ \*{-I,--include=}'[directory to search for included recipes]:include directory:_files -/' \ - '(-f --recipe)'{-f,--recipe=}'[recipe file to be executed]:recipe file:_files -g \*.aap\(-.\)' \ + '(-u --search-up --up -f --recipe)'{-f,--recipe=}'[recipe file to be executed]:recipe file:_files -g \*.aap\(-.\)' \ '--install=[install specified package]:package name:' \ '--[end of options, targets and assignments follow]' \ '*:aap target:->target' && ret=0 if [[ "$state" = target ]]; then - local aap_targets aap_recipe expl - - aap_recipe=${(v)opt_args[(I)(-f|--recipe)]:-main.aap} - if [[ -f $aap_recipe ]] && _tags targets; then - aap_targets=( "${(@)${(@)${(@f)$( _call_program targets "$words[1]" -f $aap_recipe comment 2>/dev/null )}#target }%%: *}" comment ) - _wanted targets expl target compadd -a aap_targets && ret=0 + local targets recipe + if [[ -n $opt_args[(I)(-u|--search-up|--up)] ]]; then + recipe=( (../)#main.aap(N[-1]) ) + else + recipe=${(v)opt_args[(I)(-f|--recipe)]:-main.aap} + fi + if [[ -f $recipe ]]; then + targets=( ${${(f)"$(_call_program targets $words[1] -f $recipe comment 2>/dev/null)"}/(#b)target (*):[[:blank:]]##(*)/$match[1]:${match[2]:l}} comment ) + _describe -t targets 'aap target' targets && ret=0 + else + _message -e targets 'aap target' fi fi