aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2010-03-19 10:18:09 +0100
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2010-03-19 10:18:09 +0100
commita17c7d1fdcb9bf81d2fa55ede8ee1c3ecee96183 (patch)
tree2b155516d04436ae49df963405ec7398b02e47f1
parentac728881de2b21d27e4dfef0a3451f77fe7d05a2 (diff)
downloadpaludis-a17c7d1fdcb9bf81d2fa55ede8ee1c3ecee96183.tar.gz
paludis-a17c7d1fdcb9bf81d2fa55ede8ee1c3ecee96183.tar.xz
zsh-completion: cave search completion
-rw-r--r--zsh-completion/_cave15
1 files changed, 15 insertions, 0 deletions
diff --git a/zsh-completion/_cave b/zsh-completion/_cave
index addae0f..32a6bc2 100644
--- a/zsh-completion/_cave
+++ b/zsh-completion/_cave
@@ -36,6 +36,7 @@ _cave()
'print-sets:Prints a list of sets'
'print-sync-protocols:Prints a list of sync protocols'
'resolve:Display how to resolve targets and optionally perform that resolution'
+ 'search:Search for packages with particular characteristics'
'show:Displays a formatted summary of a given object'
'sync:Sync all or specified repositories'
'update-world:Update the world set'
@@ -318,6 +319,20 @@ _cave_cmd_resolve()
'*:package depspec:_cave_packages' && return 0
}
+(( ${+functions[_cave_cmd_search]} )) ||
+_cave_cmd_search()
+{
+ _arguments -s : \
+ '(--help -h)'{--help,-h}'[Display help messsage]' \
+ '(--all-versions -a --no-all-versions)'{--all-versions,-a,--no-all-versions}'[Search in every version of packages]' \
+ '(--type -t)'{--type,-t}'[Alter how patterns are matched]:Matching:((text exact))' \
+ '(--and -& --no-and)'{--and,-\&,--no-and}'[If multiple patterns are specified, require that all patterns match]' \
+ '(--not -! --no-not)'{--not,-\!,--no-not}'[Invert the results of pattern matches]' \
+ '(--key -k)'{--key,-k}'[Search the named metadata key]' \
+ '(--name -n --no-name)'{--name,-n,--no-name}'[Search package names]' \
+ '(--description -d --no-description)'{--description,-d,--no-description}'[Search package descriptions]'
+}
+
(( ${+functions[_cave_cmd_show]} )) ||
_cave_cmd_show()
{