diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-08-29 10:53:50 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-10-07 21:53:02 +0200 |
commit | 46c4def0733a78ce08702d188e3e1a141fb07316 (patch) | |
tree | 69fb80eff39981680faeeba01f88be48026fc05f /zsh_completion.in | |
parent | 142b032212fd94c0fde75a3dd223444c212c2eaa (diff) | |
download | devtools-46c4def0733a78ce08702d188e3e1a141fb07316.tar.xz |
Support non-standard install locations
This build system overhaul allows for adding (define-style) macros to
our scripts. All source files are now suffixed with ".in" to clarify
that they might contain unprocessed defines. The Makefile provides a new
rule to preprocess source files and generate proper output scripts.
Also, add a "@pkgdatadir@" define (as used in GNU Autotools) and use it
instead of hardcoded paths to "/usr/share/devtools" everywhere. We
missed this when adding PREFIX support to the build system in commit
35fc83ce7d8dc26cd424321f2e8638d05da0a6d4.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'zsh_completion.in')
-rw-r--r-- | zsh_completion.in | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/zsh_completion.in b/zsh_completion.in new file mode 100644 index 0000000..d87850a --- /dev/null +++ b/zsh_completion.in @@ -0,0 +1,81 @@ +#compdef archbuild archco archrelease archrm commitpkg finddeps makechrootpkg mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg community-testingpkg=commitpkg community-stagingpkg=commitpkg multilibpkg=commitpkg multilib-testingpkg=commitpkg extra-i686-build=archbuild extra-x86_64-build=archbuild testing-i686-build=archbuild testing-x86_64-build=archbuild staging-i686-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild communityco=archco + +_arch=(i686 x86_64 any) + +_tags=( + core-i686 core-x86_64 core-any + extra-i686 extra-x86_64 extra-any + multilib-i686 multilib-x86_64 multilib-any + staging-i686 staging-x86_64 staging-any + testing-i686 testing-x86_64 testing-any + multilib-testing-i686 multilib-testing-x86_64 multilib-testing-any + community-i686 community-x86_64 community-any + community-staging-i686 community-staging-x86_64 community-staging-any + community-testing-i686 community-testing-x86_64 community-testing-any +) + +_archbuild_args=( + '-c[Recreate the chroot before building]' + '-r[Create chroots in this directory]:base_dir:_files -/' +) + +_archco_args=( + '*:packages:_devtools_completions_all_packages' +) + +_archrelease_args=( + "*:arch:($_tags[*])" +) + +_archrm_args=( + '1:path:_files -/' +) + +_commitpkg_args=( + "-a[Release to a specific architecture only]:arch:($_arch[*])" + '-l[Set bandwidth limit]:limit' + '1:commit_msg' +) + +_finddeps_args=( + '1:packages:_devtools_completions_all_packages' +) + +_makechrootpkg_args=( + '-I[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"' + '-c[Clean the chroot before building]' + '-d[Add the package to a local db at /repo after 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]' +) + +_mkarchroot_args=( + '-r[Run a program within the context of the chroot]:app' + '-u[Update the chroot via pacman]' + '-f[Force overwrite of files in the working-dir]' + '-C[Location of a pacman config file]:pacman_config:_files' + '-M[Location of a makepkg config file]:makepkg_config:_files' + '-n[Do not copy config files into the chroot]' + '-c[Set pacman cache]:pacman_cache:_files -/' + '-h[Display usage]' +) + +_rebuildpkgs_args=( + '1:chroot_dir:_files -/' + '*:packages:_devtools_completions_all_packages' +) + +_devtools_completions_all_packages() { + typeset -U packages + packages=($(_call_program packages pacman -Sql)) + compadd - "${(@)packages}" +} + +_devtools() { + local argname="_${service}_args[@]" + _arguments -s "${(P)argname}" +} + +_devtools |