#compdef repose

_arguments -s \
  {-h,--help}'[display this help and exit]' \
  {-V,--version}'[display version]' \
  {-v,--verbose}'[verbose output]' \
  {-f,--files}'[generate complementing files database]' \
  {-l,--list}'[list packages in the repository]' \
  {-d,--drop}'[drop package from database]:packages:_files -g "*.pkg.tar*~*.sig(.,@)"' \
  {-s,--sign}'[create a database signature]' \
  {-r,--root=-}'[repository root directory]:root:_directories' \
  {-p,--pool=-}'[set the pool to find packages in it]:pool:_directories' \
  {-m,--arch=-}'[the primary architecture of the database]:arch:(i686 x86_64)' \
  {-j,--bzip2}'[compress the database with bzip2]' \
  {-J,--xz}'[compress the database with xz]' \
  {-z,--gzip}'[compress the database with gzip]' \
  {-Z,--compress}'[compress the database with LZ]' \
  '--reflink[use reflinks instead of symlinks]' \
  '--rebuild[force rebuild the repo]' \
  '1:database:_files -g "*.db*~*.sig(.,@)(\:r)"' \
  '*::packages:_files -g "*.pkg.tar*~*.sig(.,@)"'
