diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-01-17 21:14:02 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-01-17 21:14:02 -0500 |
commit | 512436524cd3e70b9394d304bc9a43c6858c3695 (patch) | |
tree | 967945c6600f8e7273e47beb4792a43a2fa58bbc /zsh_completion.in |
Squashed 'src/devtools/' content from commit 2cda43f
git-subtree-dir: src/devtools
git-subtree-split: 2cda43f4fa3d51f3cbcb05950186896eb9c01314
Diffstat (limited to 'zsh_completion.in')
-rw-r--r-- | zsh_completion.in | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/zsh_completion.in b/zsh_completion.in new file mode 100644 index 0000000..ec07b3b --- /dev/null +++ b/zsh_completion.in @@ -0,0 +1,34 @@ +#compdef finddeps archroot + +_archbuild_args=( + '-c[Recreate the chroot before building]' + '-r[Create chroots in this directory]:base_dir:_files -/' +) + +_finddeps_args=( + '1:packages:_devtools_completions_all_packages' +) + +_archroot_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]' +) + +_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 |