From 770c5da67f3c0fb69070f7ad6884934658f85466 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 19 Aug 2003 12:36:05 +0000 Subject: 18863: new completion for aap --- ChangeLog | 7 +++++++ Completion/Unix/Command/_aap | 45 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 Completion/Unix/Command/_aap diff --git a/ChangeLog b/ChangeLog index a0fa205cd..f259ca4c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,11 +44,18 @@ * 18866: Etc/completion-style-guide: document conventions used in completion functions + * unposted: Completion/Unix/Command/_aap: adjust return code + in the same way as was done for old completions in 18631 + 2003-07-17 Peter Stephenson * 18864: Src/lex.c: unnecessary spaces with empty substitutions when using ${(Q)...} flag. +2003-07-17 Doug Kearns + + * 18863: Completion/Unix/Command/_aap: new completion for aap + 2003-07-09 Oliver Kiddle * 18841: Completion/Base/Completer/_prefix: work around problem diff --git a/Completion/Unix/Command/_aap b/Completion/Unix/Command/_aap new file mode 100644 index 000000000..6a06480ed --- /dev/null +++ b/Completion/Unix/Command/_aap @@ -0,0 +1,45 @@ +#compdef aap + +# A-A-P recipe executive version 1.001; released 2003 Jul 05 20:44:44 GMT + +local curcontext="$curcontext" state line ret=1 +typeset -A opt_args + +_arguments \ + '(- *)'{-V,--version}'[print version information and exit]' \ + '(- *)'{-h,--help}'[print help information and exit]' \ + {-v,--verbose}'[print more information]' \ + {-s,--silent}'[print less information]' \ + {-d,--debug=}'[debug the specified items]:flags:' \ + '--profile=[profile A-A-P execution and write results in specified file]:output file:_files' \ + {-n,--nobuild}'[print the build commands but do not execute them]' \ + '--changed=[consider specified file changed]:changed file:_files' \ + {-t,--touch}'[update target signatures, do not build]' \ + {-F,--force}'[force rebuilding]' \ + {-C,--contents}'[only build when file contents changed]' \ + \*{-c,--command=}'[execute a command after reading the recipe]:aap command:' \ + {-k,--continue}'[continue building after an error]' \ + {-S,--stop}'[stop building at first error (default)]' \ + {-R,--fetch-recipe}'[fetch recipe file and child recipes]' \ + {-N,--nofetch-recipe}'[do not fetch recipes for "fetch" target]' \ + {-a,--nocache}"[always download files, don't use the cache]" \ + {-l,--local}'[do not recurse into subdirectories]' \ + {-j,--jobs=}'[maximum number of parallel jobs]:number of jobs:' \ + {-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=}'[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 + fi +fi + +return ret -- cgit 1.4.1