diff options
author | Doug Kearns <dkearns@users.sourceforge.net> | 2003-07-17 04:57:00 +0000 |
---|---|---|
committer | Doug Kearns <dkearns@users.sourceforge.net> | 2003-07-17 04:57:00 +0000 |
commit | 53eb501c708e74346f3ab3e93c51929f7b9c2588 (patch) | |
tree | eaee7b0cf41f67df03258fd86201251a2cec09df /Completion/Unix/Command | |
parent | 088f324ad4d5fbe5c19eb4d359b33dee2712eebf (diff) | |
download | zsh-53eb501c708e74346f3ab3e93c51929f7b9c2588.tar.gz zsh-53eb501c708e74346f3ab3e93c51929f7b9c2588.tar.xz zsh-53eb501c708e74346f3ab3e93c51929f7b9c2588.zip |
18863: new completion for aap
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/.distfiles | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_aap | 45 |
2 files changed, 46 insertions, 1 deletions
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index 84ba7627e..ba94cf5c5 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -20,5 +20,5 @@ _fsh _chkconfig _cdcd _irssi _mysqldiff _sccs _netcat _larch _texinfo _figlet _elinks _tidy _global _global_tags _ant _lsof _mt _xmlsoft _perforce _python _antiword _screen _renice -_ecasound _gpg _subversion +_ecasound _gpg _subversion _aap ' diff --git a/Completion/Unix/Command/_aap b/Completion/Unix/Command/_aap new file mode 100644 index 000000000..42271b2cb --- /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 +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 |