2014-11-13 17:59:10 +01:00
|
|
|
#compdef build-set chroot-run finddeps mkchrootpkg mkchroot
|
|
|
|
|
|
|
|
m4_include(lib/valid-tags.sh)
|
|
|
|
|
|
|
|
_build_set_args=(
|
2014-11-13 21:13:19 +01:00
|
|
|
'-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]'
|
2014-11-13 17:59:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
_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]'
|
|
|
|
)
|
|
|
|
|
2014-11-14 13:12:21 +01:00
|
|
|
_manjaro_tools_completions_all_packages() {
|
2014-11-13 17:59:10 +01:00
|
|
|
typeset -U packages
|
|
|
|
packages=($(_call_program packages pacman -Sql))
|
|
|
|
compadd - "${(@)packages}"
|
|
|
|
}
|
|
|
|
|
|
|
|
_manjaro_tools() {
|
|
|
|
local argname="_${service//-/_}_args[@]"
|
|
|
|
_arguments -s "${(P)argname}"
|
|
|
|
}
|
|
|
|
|
|
|
|
_manjaro_tools
|