aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2012-05-09 19:29:45 +0200
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2012-05-09 19:45:05 +0200
commitd23bc70f8093e431de9b93193f80711efd6ae3d3 (patch)
tree1a7394588bd1b8c1649abfaba18627ae76abe06d
parent9d54f152203b16736f6df482a8ddc248ea59e310 (diff)
downloadpaludis-d23bc70f8093e431de9b93193f80711efd6ae3d3.tar.gz
paludis-d23bc70f8093e431de9b93193f80711efd6ae3d3.tar.xz
Update zsh completions.
New commands: cave print-checksum and cave print-checksum-algorithms
-rw-r--r--zsh-completion/_cave27
1 files changed, 27 insertions, 0 deletions
diff --git a/zsh-completion/_cave b/zsh-completion/_cave
index 636bbf9..6d9179e 100644
--- a/zsh-completion/_cave
+++ b/zsh-completion/_cave
@@ -49,6 +49,8 @@ _cave()
'perform:Perform an action upon a package'
'print-best-version:Prints the best installed version matching a particular spec'
'print-categories:Prints a list of known categories'
+ 'print-checksum:prints cryptographic checksums'
+ 'print-checksum-algorithms:prints supported cryptographic checksum algorithms'
'print-commands:Prints a list of known cave commands'
'print-dependent-ids:Prints a list of installed IDs that are dependent upon another installed ID'
'print-environment-metadata:Prints environment metadata'
@@ -432,6 +434,24 @@ _cave_cmd_print-categories()
'*--repository[Show only categories in this repository]:repository name:_cave_repositories'
}
+(( ${+functions[_cave_cmd_print-checksum]} )) ||
+_cave_cmd_print-checksum()
+{
+ _arguments -s : \
+ '(--help -h)'{--help,-h}'[Display help messsage]' \
+ '(--file -f --stdin -s --text -t)'{--stdin,-s}'[Calculate the checksum of standard input]' \
+ '(--file -f --stdin -s --text -t)'{--file,-f}'[Calculate the checksum of the contents of the specified file]' \
+ '(--file -f --stdin -s --text -t)'{--text,-t}'[Calculate the checksum of the specified text]' \
+ ':checksum algorithm:_cave_algorithms' && return 0
+}
+
+(( ${+functions[_cave_cmd_print-checksum-algorithms]} )) ||
+_cave_cmd_print-checksum-algorithms()
+{
+ _arguments -s : \
+ '(--help -h)'{--help,-h}'[Display help messsage]'
+}
+
(( ${+functions[_cave_cmd_print-commands]} )) ||
_cave_cmd_print-commands()
{
@@ -864,6 +884,13 @@ _cave_cmd_verify()
'(--help -h)'{--help,-h}'[Display help messsage]'
}
+(( ${+functions[_cave_algorithms]} )) ||
+_cave_algorithms() {
+ local -a _cave_algorithms
+ _cave_algorithms=( $(cave print-checksum-algorithms) )
+ _describe -t algorithm 'algorithm' _cave_algorithms
+}
+
(( ${+functions[_cave_packages]} )) ||
_cave_packages() {
: