1#compdef debfoster 2 3local curcontext="$curcontext" state line expl ret=1 4 5_arguments -C \ 6 '(-v --verbose)'{-v,--verbose}'[be a loudmouth]' \ 7 '(-V --version)'{-V,--versuib}'[show version and copyright information]' \ 8 '(-h --help)'{-h,--help}'[show help information]' \ 9 '(-q --quiet)'{-q,--quiet}'[silently build keeper file]' \ 10 '(-f --force)'{-f,--force}'[force system to conform to keeper file]' \ 11 '(-m --mark-only)'{-m,--mark-only}'[do not install or delete packages]' \ 12 '(-u --upgrade)'{-u,--upgrade}'[try to upgrade dependencies]' \ 13 '(-c --config)'{-c,--config}'[specify configuration file]:file:_files' \ 14 '(-k --keeperfile)'{-k,--keeperfile}'[specify keeper file]:file:_files' \ 15 '(-n --no-keeperfile)'{-n,--no-keeperfile}'[do not read keeper file]' \ 16 '(-i --ignore-default-rules)'{-i,--ignore-default-rules}'[ignore default rules]' \ 17 '(-a --show-keepers)'{-a,--show-keepers}'[show packages on keeper list]' \ 18 '(-s --show-orphans)'{-s,--show-orphans}'[show orphaned packages]' \ 19 '(-d --show-depends)'{-d,--show-depends}'[show all depends of specified package]:package:_deb_packages avail' \ 20 '(-e --show-dependents)'{-e,--show-dependents}'[show dependents of specified package]:package:_deb_packages avail' \ 21 '(-p --show-providers)'{-p,--show-providers}'[show packages providing specified package]:package:_deb_packages avail' \ 22 '(-r --show-related)'{-r,--show-related}'[show packages brought in by specified package]:package:_deb_packages avail' \ 23 '(-t --use-tasks)'{-t,--use-tasks}'[make tasks visible as packages]' \ 24 '*-'{-option,o}'[override any configuration option]:option string:->option' \ 25 '*:package markings: _alternative "installed:installed packages:_deb_packages -S- installed" "uninstalled:uninstalled packages:_deb_packages uninstalled"' \ 26 && ret=0 27 28if [[ -n "$state" ]]; then 29 if compset -P '*='; then 30 case "$IPREFIX" in 31 *(#i)(install|remove|info)cmd*) 32 _wanted values expl 'command string' _command && ret=0 33 ;; 34 *(#i)(keeperfile|dpkg(status|available))*) 35 _wanted values expl 'metadata file' _files && ret=0 36 ;; 37 *(#i)maxpriority*) 38 _wanted values expl 'package priority' \ 39 compadd required important standard optional extra ANY && ret=0 40 ;; 41 *(#i)(use(hold|essential|predepends|recommends|suggests|tasks)|negativekeepers|verbose|force|quiet)*) 42 _wanted values expl 'truth value' \ 43 compadd yes no && ret=0 44 ;; 45 *(#i)(no|)keepsections*) 46 _wanted values expl 'section' compadd \ 47 x11 web utils text tex sound shells science \ 48 otherosfs oldlibs news net misc math mail libs \ 49 interpreters hamradio graphics games electronics \ 50 editors doc devel comm base admin && ret=0 51 ;; 52 *(#i)guessdepends*) 53 _wanted values expl 'name extension' \ 54 compadd doc dev && ret=0 55 ;; 56 esac 57 else 58 _wanted values expl 'configure file option' \ 59 compadd -M 'm:{a-z}={A-Z}' -S '=' - \ 60 InstallCmd RemoveCmd InfoCmd KeeperFile DpkgStatus \ 61 DpkgAvailable MaxPriority UseHold UseEssential \ 62 UsePreDepends UseRecommends UseSuggests UseTasks \ 63 KeepSections NokeepSections GuessDepends NegativeKeepers \ 64 Verbose Force Quiet && ret=0 65 fi 66fi 67 68return ret 69