#compdef build-set chroot-run finddeps mkchrootpkg mkchroot m4_include(lib/valid-tags.sh) _build_set_args=( '-c[Recreate chroot]' '-r[Chroots directory]:base_dir:_files -/' '-b[Set branch]:branch:_branch -/' '-a[Set arch]:arch:_arch -/' '-p[Set profile or pkg]:base_dir:_files -/' '-w[Clean up]' '-s[Sign packages]' ) _chroot_run_args=( '-C[Location of a pacman config file]:pacman_config:_files' '-M[Location of a makepkg config file]:makepkg_config:_files' '-S[Location of a pacman-mirrors config file]:pacman_mirrors_config:_files' '-c[Set pacman cache]:pacman_cache:_files -/' '-h[Display usage]' ) _finddeps_args=( '1:packages:_devtools_completions_all_packages' ) _mkchrootpkg_args=( '-I[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"' '-c[Clean the chroot before building]' '-h[Display usage]' '-l[The directory to use as the working copy]:copy_dir:_files -/' '-r[The chroot dir to use]:chroot_dir:_files -/' '-u[Update the working copy of the chroot before building]' ) _mkchroot_args=( '-C[Location of a pacman config file]:pacman_config:_files' '-M[Location of a makepkg config file]:makepkg_config:_files' '-S[Location of a pacman-mirrors config file]:pacman_mirrors_config:_files' '-c[Set pacman cache]:pacman_cache:_files -/' '-h[Display usage]' ) _manjaro_tools_completions_all_packages() { typeset -U packages packages=($(_call_program packages pacman -Sql)) compadd - "${(@)packages}" } _manjaro_tools() { local argname="_${service//-/_}_args[@]" _arguments -s "${(P)argname}" } _manjaro_tools