* PATCH: aap completion
@ 2003-07-17 4:33 Doug Kearns
0 siblings, 0 replies; only message in thread
From: Doug Kearns @ 2003-07-17 4:33 UTC (permalink / raw)
To: zsh-workers
Here's a first cut at a completion function for aap.
http://www.a-a-p.org/
Regards,
Doug
Index: Completion/Unix/Command/_aap
===================================================================
RCS file: Completion/Unix/Command/_aap
diff -N Completion/Unix/Command/_aap
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_aap 17 Jul 2003 04:17:24 -0000
@@ -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
+typeset -A opt_args
+
+_arguments \
+ '(- *)'{-V,--version}'[print version information and exit]' \
+ '(- *)'{-h,--help}'[print help message (this one) 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 FILE]:output file:_files' \
+ {-n,--nobuild}'[print the build commands but do not execute them]' \
+ '--changed=[consider 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 package NAME]:package name:' \
+ '--[end of options, targets and assignments follow]' \
+ '*:aap target:->target' && return
+
+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 && return
+ fi
+fi
+
+return 1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-07-17 4:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-17 4:33 PATCH: aap completion Doug Kearns
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).