aboutsummaryrefslogtreecommitdiff
path: root/zsh-completion/_inquisitio
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-03 17:07:13 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-03 17:07:13 +0000
commitceb5b2f5d8a0f012f246f031a46f860d39a150fb (patch)
treec6baa52be86eeda200decc0860578cd72bf4091b /zsh-completion/_inquisitio
parent7aaaf13f6075ed1f6755d4047981b3be26355ba8 (diff)
downloadpaludis-ceb5b2f5d8a0f012f246f031a46f860d39a150fb.tar.gz
paludis-ceb5b2f5d8a0f012f246f031a46f860d39a150fb.tar.xz
Update ZSH completion. Fixes: ticket:466. From: bapt
Diffstat (limited to 'zsh-completion/_inquisitio')
-rw-r--r--zsh-completion/_inquisitio49
1 files changed, 32 insertions, 17 deletions
diff --git a/zsh-completion/_inquisitio b/zsh-completion/_inquisitio
index 9eaa0c7b8..bf5089747 100644
--- a/zsh-completion/_inquisitio
+++ b/zsh-completion/_inquisitio
@@ -1,37 +1,52 @@
#compdef inquisitio
-
+#
# vim: set et sw=4 sts=4 ts=4 ft=zsh :
-# ZSH completion for inquisitio
+# ZSH completion for adjutrix
# Written by Baptiste Daroussin <baptux at free.fr>
_inquisitio() {
- local actions general_options search_options action_options
+ local actions actions_options general_options matching_options filter_options output_options
actions=(
--search -s
--version -V
--help -h
)
- action_options=(
- "($actions)"{--search,-s}"[Search for a package]"
- "(: -)"{--version,-V}"[Display program version]"
- "(: -)"{--help,-h}"[Display program help]"
+ matching_options=(
+ "(--keys -k)"{-k,--keys}"[Match using listed metadata keys]"
+ "(--matcher -m)"{-m,--matcher}"[Which match algorithm to use]:algorithm:((text\:Simple\ text\ match pcre\:Regular\ expression exact\:Exact\ text\ match))"
+ "(--flatten -f)"{-f,--flatten}"[Flatten spec trees, rather than matching against individual items]"
+ "(--enabled-only -e)"{-e,--enabled-only}"[When searching spec trees, only look in enabled subtrees]"
+ "(--not -n)"{-n,--not}"[Select packages that do not match]"
)
+
+ filter_options=(
+ "(--repository -r)"{-r,--repository}"[Matches with this repository name only]:repository:_paludis_packages repositories"
+ "--repository-format[Matches with this repository format only]:format:_paludis_packages repository-formats"
+ "--category[Matches with this category name only]:category:_paludis_packages categories"
+ "--package[Matches with this package name only]:package:_paludis_packages available"
+ "(--visible-only -v)"{-v,--visible-only}"[Only consider visible packages]"
+ "(--all-versions -a)"{-a,--all-versions}"[Check all versions, rather than only one]"
+ "(--kind -k)"{-k,--kind}"[Packages of this kind only]:((installable\:Installable\ packages installed\:Installed\ packages all\:All\ packages))"
+ )
+
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))"
+ "--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]"
"(--environment -E)"{-E,--environment}"[Environment specification]"
- "(--repository-dir -D)"{--repository-dir,-D}"[Where to find the repository]:repository:_files -/"
)
- search_options=(
- "(--matcher -m)"{--matcher,-m}"[Which match algorithm to use]:which:((text\:Simple\ text\ match pcre\:Regular\ expression\ match\ using\ pcre))"
- "(--extractors -e)"{--extractors,-e}"[Which extractors to use]:which:((description\:Match\ against\ description name\:Match\ against\ package\ name homepage\:Match\ against\ homepage))"
- "--repository[Matches with this repository name only]:repository:_paludis_packages repositories"
- "--repository-format[Matches with this repository format only]:format:_paludis_packages repository-formats"
- "--category[Matches with this category name only]:category:_paludis_packages categories"
- "--package[Matches with this package name only]:package:_paludis_packages available"
+ output_options=(
+ "--compact[Display output using one line per entry]"
+ "(--show-dependencies -D)"{-D,--show-dependencies}"[Show dependencies]"
+ "(--show-metadata -M)"{-M,--show-metadata}"[Show raw metadata]"
)
+ action_options=(
+ "($actions)"{--search,-s}"[Search for a package]"
+ "(: -)"{--version,-V}"[Display program version]"
+ "(: -)"{--help,-h}"[Display program help]"
+ )
+
_arguments -s \
- $general_options[@] $search_options[@] $action_options[@] && return 0
+ $general_options[@] $output_options[@] $filter_options[@] $matching_options[@] $action_options[@] && return 0
}
_inquisitio "$@"