1#compdef pbuilder
2
3local expl
4
5if (( CURRENT == 2 )); then
6  _wanted tag expl 'pbuilder command' \
7    compadd create update build execute clean login dumpconfig debuild \
8  	--create --update --build --execute --clean --login --dumpconfig --debuild
9else
10  compset -n 1
11  _arguments \
12    '--basetgz:location:_files -g "*.tgz(-.)"' \
13    '--buildplace:location:_files -/' \
14    '--buildresult:location:_files -/' \
15    '--mirror:URL:_urls' \
16    '--othermirror:URL:_urls' \
17    '--distribution:suite:(breezy dapper edgy etch feisty gutsy hardy hoary intrepid jaunty karmic lenny lucid potato sarge sid squeeze warty woody' \
18    '--architecture:architecture:(alpha amd64 armel hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sparc)' \
19    '--components:component:(main contrib non-free)' \
20    '--override-config' \
21    '--hookdir:location:_files -/' \
22    '--debbuildopts:dpkg-buildpackage options:' \
23    '--logfile:log file:_files' \
24    '--binary-arch' \
25    '--bindmounts:bind mountpoints:_files -/' \
26    '--debootstrapopts:debootstrap options:' \
27    '--debootstrap:debootstrap implementation:(debootstrap cdebootstrap)' \
28    '--save-after-login' \
29    '--save-after-exec' \
30    '--autocleanaptcache' \
31    '*:source package:_files -g "*.dsc(-.)"'
32fi
33