summaryrefslogtreecommitdiff
path: root/zsh_completion.in
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2019-09-13 01:32:57 +0200
committerLevente Polyak <anthraxx@archlinux.org>2019-09-28 00:16:09 +0200
commit64b7d995040fc670aaed5fbd048157b3feba0574 (patch)
treecfb9955b87bea4a329c3372da874d149102c813d /zsh_completion.in
parentf32a264796b3b43662b4734f1730d7a819d32484 (diff)
downloaddevtools-64b7d995040fc670aaed5fbd048157b3feba0574.tar.xz
zsh_completion: add sogrep completions
Transform sogrep into an in-prog so we can benefit from the m4 macro to specify valid repos in a single place of truth. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'zsh_completion.in')
-rw-r--r--zsh_completion.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/zsh_completion.in b/zsh_completion.in
index 78330ea..72dbfa3 100644
--- a/zsh_completion.in
+++ b/zsh_completion.in
@@ -1,7 +1,8 @@
-#compdef archbuild archco arch-nspawn archrelease 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-x86_64-build=archbuild testing-x86_64-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild multilib-staging-build=archbuild kde-unstable-x86_64-build=archbuild gnome-unstable-x86_64-build=archbuild communityco=archco checkpkg
+#compdef archbuild archco arch-nspawn archrelease 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-x86_64-build=archbuild testing-x86_64-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild multilib-staging-build=archbuild kde-unstable-x86_64-build=archbuild gnome-unstable-x86_64-build=archbuild communityco=archco checkpkg sogrep
# License: Unspecified
m4_include(lib/valid-tags.sh)
+m4_include(lib/valid-repos.sh)
_archbuild_args=(
'-c[Recreate the chroot before building]'
@@ -74,6 +75,14 @@ _checkpkg_args=(
'(-h --help)'{-h,--help}'[Display usage]'
)
+_sogrep_args=(
+ '(-v --verbose)'{-v,--verbose}'[Show matched links in addition to pkgname]'
+ '(-r --refresh)'{-r,--refresh}'[Refresh the links databases]'
+ '(-h --help)'{-h,--help}'[Display usage]'
+ '1:repo:(all $_repos[*])'
+ '2:libname'
+)
+
_devtools_completions_all_packages() {
typeset -U packages
packages=($(_call_program packages pacman -Sql))