aboutsummaryrefslogtreecommitdiff
path: root/zsh-completion/_adjutrix
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-23 11:12:57 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-23 11:12:57 +0000
commitf34c586ddea4ad5ceb49535382e77c30680416a3 (patch)
tree265c2d537b7444533505e54cc9ab9f4fe4f93a21 /zsh-completion/_adjutrix
parent36573677c520333da88777d3bbc9528b4cc05d13 (diff)
downloadpaludis-f34c586ddea4ad5ceb49535382e77c30680416a3.tar.gz
paludis-f34c586ddea4ad5ceb49535382e77c30680416a3.tar.xz
Add zsh completion. From Baptiste Daroussin.
Diffstat (limited to 'zsh-completion/_adjutrix')
-rw-r--r--zsh-completion/_adjutrix57
1 files changed, 57 insertions, 0 deletions
diff --git a/zsh-completion/_adjutrix b/zsh-completion/_adjutrix
new file mode 100644
index 000000000..a2bcbcd41
--- /dev/null
+++ b/zsh-completion/_adjutrix
@@ -0,0 +1,57 @@
+#compdef adjutrix
+
+# vim: set et sw=4 sts=4 ts=4 ft=zsh :
+# ZSH completion for adjutrix
+# Written by Baptiste Daroussin <baptux at free.fr>
+
+_adjutrix() {
+ local actions tree_options profile_options general_options actions_args arches
+ actions=(
+ --find-stable-candidates -s
+ --find-dropped-keywords -d
+ --find-insecure-packages -i
+ --keyword-graph -k
+ --reverse-deps -r
+ --display-profiles-use -u
+ --display-default-system-resolution -S
+ --version -V
+ --help -h
+ )
+ arches=(alpha amd64 arm hppa ia64 m68k mips ppc ppc64 ppc-macos s390 sh sparc sparc-fbsd x86 x86-fbsd)
+ tree_options=(
+ '(--category -C)'{--category,-C}'[Matches with this category name only (may be specified multiple times)]:Category:'
+ '(--package -P)'{--package,-P}'[Matches with this package name only (may be specified multiple times)]:Packages:'
+ )
+ profile_options=(
+ '(--profile -p)'{--profile,-p}'[Display results for this profile path, rather than all profiles (may be specified multiple times)]:Profile:_files -/'
+ '(--unstable -U)'{--unstable,-U}'[Accept ~arch as well as arch]'
+ )
+ general_options=(
+ '--log-level[Specify the log level]:log level:((debug\:Show\ debug\ output qa\:Show\ QA\ messages\ and\ warnings\ only warning\:Show\ warnings\ only silent\:Suppress\ all\ log\ messages))'
+ '(--no-colour --no-color)'{--no-colour,--no-color}"[Do not use colour]"
+ '(--repository-dir -D)'{--repository-dir,-D}'[Where to find the repository]:repository:_files -/'
+ )
+ action_args=(
+ "($actions)"{--find-stable-candidates,-s}"[Search for stable package candidates]:arch:($arches)"
+ "($actions)"{--find-dropped-keywords,-d}"[Search for packages where keywords have been dropped]:arch:($arches)"
+ "($actions)"{--find-insecure-packages,-i}"[Search for packages marked as insecure by a GLSA]"
+ "($actions)"{--keyword-graph,-k}"[Display keywords graphically]"
+ "($actions)"{--reverse-deps,-r}"[all package that depend on a given dep atom]:Packages:"
+ "($actions)"{--display-profiles-use,-u}"[Display USE information for all profiles]"
+ "($actions)"{--display-default-system-resolution,-S}"[Display package names and versions that are included in the default resolution of the system set]"
+ "(: -)"{--version,-V}"[Display program version]"
+ "(: -)"{--help,-h}"[Display program help]"
+ )
+ if (( $words[(I)(--(find-stable-candidates|find-dropped-keywords|find-insecure-packages|keyword-graph|reverse-deps)|-[[:alpha:]]#(s|d|i|k|r)[[:alpha:]]#)] ));then
+ _arguments -s \
+ $general_options[@] $tree_options[@] && return 0
+ elif (( $words[(I)(--(display-profiles-use|display-default-system-resolution)|-[[:alpha:]]#(u|S)[[:alpha:]]#)] ));then
+ _arguments -s \
+ $general_options[@] $profile_options[@] && return 0
+ else
+ _arguments -s \
+ $general_options[@] $profile_options[@] $tree_options[@] $action_args[@] && return 0
+ fi
+}
+
+_adjutrix "$@"