1#compdef dak 2 3local curcontext="$curcontext" state line expl cmd args ret=1 4typeset -A opt_args 5 6_arguments -C \ 7 '1: :->cmd' \ 8 '*:: :->args' && ret=0 9 10if (( ! $+_dak_cmds )); then 11 typeset -gH _dak_cmds 12 _dak_cmds=(${${${(f)${"$(_call_program dak dak --help)"#*Availa#ble commands:}}#[^a-z] ##}%%[ ]*}) 13fi 14 15if [[ $state != 'args' ]]; then 16 _describe -t subcommand 'subcommand' _dak_cmds 17 return 0 18fi 19 20cmd="$words[1]" 21curcontext="${curcontext%:*:*}:dak-$cmd:" 22 23args=( '(-)'{--help,-h}'[show help message]' ) 24 25case $cmd in 26(ls) 27 args+=( 28 '(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel' 29 '(-b --binary-type)'{-b,--binary-type=}':type:(deb udeb)' 30 '(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free' 31 '(-g --greaterorequal)'{-g,--greaterorequal} 32 '(-G --greaterthan)'{-G,--greaterthan} 33 '(-r --regex)'{-r,--regex} 34 '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental' 35 '(-S, --source-and-binary)'{-S,--source-and-binary} 36 '*:package:_deb_packages avail' 37 ) 38 ;; 39(override) 40 args+=( 41 '(-d --done)'{-d,--done=}'[send prioritys/section change as closure to bug]:bug number:' 42 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 43 '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental' 44 ':package:_deb_packages avail' 45 ':section:(admin base comm contrib/admin contrib/comm contrib/devel contrib/doc contrib/games contrib/graphics contrib/interpreters contrib/kde contrib/libdevel contrib/libs contrib/mail contrib/math contrib/misc contrib/net contrib/otherosfs contrib/perl contrib/python contrib/science contrib/sound contrib/tex contrib/text contrib/utils contrib/web contrib/x11 devel doc editors electronics embedded games gnome graphics hamradio interpreters kde libdevel libs mail math misc net news non-free/admin non-free/base non-free/comm non-free/devel non-free/doc non-free/editors non-free/electronics non-free/games non-free/graphics non-free/hamradio non-free/libdevel non-free/libs non-free/mail non-free/math non-free/misc non-free/net non-free/news non-free/otherosfs non-free/python non-free/science non-free/sound non-free/tex non-free/text non-free/utils non-free/web non-free/x11 oldlibs otherosfs perl python science shells sound tex text utils web x11)' 46 ':priority:(extra important optional required standard)' 47 ) 48 ;; 49(check-archive) 50 args+=( 51 '*:mode:(( 52 md5sums\:validate\ the\ md5sums\ stored\ in\ the\ database 53 files\:check\ files\ in\ the\ database\ against\ what\ is\ in\ the\ archive 54 dsc-syntax\:validate\ the\ syntax\ of\ .dsc\ files\ in\ the\ archive 55 missing-overrides\:check\ for\ missing\ overrides 56 source-in-one-dir\:ensure\ the\ source\ for\ each\ package\ is\ in\ one\ directory 57 timestamps\:check\ for\ future\ timestamps\ in\ .debs 58 tar-gz-in-dsc\:ensure\ each\ .dsc\ lists\ a\ .tar.gz\ file 59 validate-indices\:ensure\ files\ mentioned\ in\ Packages\ and\ Sources\ exist 60 files-not-symlinks\:check\ files\ in\ the\ database\ are\ not\ symlinks 61 validate-builddeps\:validate\ build-dependencies\ of\ .dsc\ files\ in\ the\ archive))' 62 ) 63 ;; 64(queue-report) 65 args+=( 66 '(-n --new)'{-n,--new}'[produce html output]' 67 '(-s --sort)'{-s,--sort=}':sort key:((ao\:age,\ oldest\ first an\:age,\ newest\ first na\:name,\ ascending nd\:name,\ descending nf\:notes,\ first nl\:notes,\ last))' 68 '(-a --age)'{-a,--age=}':age key:((m\:minutes h\:hours d\:days w\:weeks o\:months y\:years))' 69 ) 70 ;; 71(rm) 72 args+=( 73 '(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel' 74 '(-b --binary)'{-b,--binary}'[remove binaries only]' 75 '(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free' 76 '(-C --carbon-copy)'{-C,--carbon-copy=}':cc address:_email_addresses' 77 '(-d --done)'{-d,--done=}'[send prioritys/section change as closure to bug]:bug number:' 78 '(-m --reason)'{-m,--reason=}':reason for removal:' 79 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 80 '(-p --partial)'{-p,--partial}'[do not affect override files]' 81 '(-R --rdep-check)'{-R,--rdep-check}'[check reverse dependencies]' 82 '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental' 83 '(-S, --source-only)'{-S,--source-only}'[remove source only]' 84 '*:package:_deb_packages avail' 85 ) 86 ;; 87(process-unchecked|process-accepted) 88 args+=( 89 '(-a --automatic)'{-a,--automatic}'[automatic run]' 90 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 91 '(-p --no-lock)'{-p,--no-lock}'[do not check lockfile]' 92 '(-s --no-mail)'{-s,--no-mail}'[do not send any mail]' 93 '(-V --version)'{-V,--version}'[display the version number and exit]' 94 ) 95 ;; 96 97(make-suite-file-list) 98 args+=( 99 '(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel' 100 '(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free' 101 '(-n --no-delete)'{-n,--no-delete}'[do not delete older versions]' 102 '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental' 103 ) 104 ;; 105 106(generate-releases) 107 args+=( 108 '*:suite:(oldstable stable testing unstable experimental)' 109 ) 110 ;; 111 112(generate-index-diffs) 113 args+=( 114 '-c[give the canonical path of the file]' 115 '-p[name for the patch (defaults to current time)]' 116 '-n[take no action]' 117 '*:suite:(oldstable stable testing unstable experimental)' 118 ) 119 ;; 120 121(clean-suites) 122 args+=( 123 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 124 '*:suite:(oldstable stable testing unstable experimental)' 125 ) 126 ;; 127 128(clean-queues) 129 args+=( 130 '(-d --days)'{-d,--days=}':days:' 131 '(-i --incoming)'{-i,--incoming=}':incoming dir:' 132 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 133 '(-v --verbose)'{-v,--verbose}'[explain what is being done]' 134 ) 135 ;; 136 137(clean-proposed-updates) 138 args+=( 139 '(-v --verbose)'{-v,--verbose}'[be more verbose about what is being done]' 140 '*:changes or admin file:_files -g "*.(changes|joey)(-.)"' 141 ) 142 ;; 143 144(check-overrides) 145 args+=( 146 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 147 ) 148 ;; 149 150(clean-proposed-updates) 151 args+=( 152 '(-q --quiet)'{-q,--quiet}'[be quieter about what is being done]' 153 '(-v --verbose)'{-v,--verbose}'[be more verbose about what is being done]' 154 '*:changes or deb or admin file:_files -g "*.(changes|deb|joey)(-.)"' 155 ) 156 ;; 157 158(control-overrides) 159 args+=( 160 '(-c --component)'{-c,--component=}':component:(main contrib non-free)' 161 '(-s --suite)'{-s,--suite=}':suite:(oldstable stable testing unstable experimental)' 162 '(-t --type)'{-t,--type=}':type:(deb dsc udeb)' 163 '(-a, --add)'{-a,--add}'[add overrides]' 164 '(-S, --set)'{-S,--set}'[set overrides]' 165 '(-l, --list)'{-l,--list}'[list overrides]' 166 '(-q, --quiet)'{-q,--quiet}'[be less verbose]' 167 ) 168 ;; 169 170(control-suite) 171 args+=( 172 '(-a --add)'{-a,--add=}':suite:(oldstable stable testing unstable experimental)' 173 '(-l --list)'{-l,--list=}':suite:(oldstable stable testing unstable experimental)' 174 '(-r --remove)'{-r,--remove=}':suite:(oldstable stable testing unstable experimental)' 175 '(-s --set)'{-s,--set=}':suite:(oldstable stable testing unstable experimental)' 176 '*:file:_files' 177 ) 178 ;; 179 180(cruft-report) 181 args+=( 182 '(-m --mode)'{-m,--mode=}':mode:(full daily)' 183 '(-s --suite)'{-s,--suite=}':suite:(oldstable stable testing unstable experimental)' 184 ) 185 ;; 186 187(decode-dot-dak) 188 args+=( 189 '*:dot-dak file:_files -g "*.dak(-.)"' 190 ) 191 ;; 192 193(import-archive) 194 args+=( 195 '(-a --action)'{-a,--action}'[actually perform the initialization]' 196 ) 197 ;; 198 199(import-users-from-passwd) 200 args+=( 201 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 202 '(-q --quiet)'{-q,--quiet}'[be quiet about what is being done]' 203 '(-v --verbose)'{-v,--verbose}'[explain what is being done]' 204 ) 205 ;; 206 207(make-maintainers) 208 args+=( 209 '*:extra file:_files' 210 ) 211 ;; 212 213(poolize) 214 args+=( 215 '(-l --limit)'{-l,--limit=}'[only migrate amount of packages]:amount in kb:' 216 '(-n --no-action)'{-n,--no-action}'[do not do anything]' 217 '(-v --verbose)'{-v,--verbose}'[explain what is being done]' 218 ) 219 ;; 220 221(reject-proposed-updates) 222 args+=( 223 '(-m --message)'{-m,--message=}'[use this message for rejection]:message:' 224 '(-s --no-mail)'{-s,--no-mail}'[do not send any mail]' 225 '*:changes file:_files -g "*.changes(-.)"' 226 ) 227 ;; 228 229(stats) 230 args+=( 231 ':mode:((arch-space\:displays\ space\ used\ by\ each\ architecture pkg-nums\:displays\ the\ number\ of\ packages\ by\ suite/architecture daily-install\:displays\ daily\ install\ stats\ suitable\ for\ graphing))' 232 ) 233 ;; 234 235(symlink-dists) 236 args+=( 237 '(-v --verbose)'{-v,--verbose}'[explain what is being done]' 238 ) 239 ;; 240 241 (*) 242 _files 243 ;; 244 245esac 246 247_arguments -s "$args[@]" && ret=0 248return $ret 249