37 lines
967 B
Plaintext
37 lines
967 B
Plaintext
|
#compdef b2sum
|
||
|
|
||
|
autoload -U is-at-least
|
||
|
|
||
|
_b2sum() {
|
||
|
typeset -A opt_args
|
||
|
typeset -a _arguments_options
|
||
|
local ret=1
|
||
|
|
||
|
if is-at-least 5.2; then
|
||
|
_arguments_options=(-s -S -C)
|
||
|
else
|
||
|
_arguments_options=(-s -C)
|
||
|
fi
|
||
|
|
||
|
local context curcontext="$curcontext" state line
|
||
|
_arguments "${_arguments_options[@]}" \
|
||
|
'-l+[digest length in bits; must not exceed the max for the blake2 algorithm and must be a multiple of 8]: : ' \
|
||
|
'--length=[digest length in bits; must not exceed the max for the blake2 algorithm and must be a multiple of 8]: : ' \
|
||
|
'-c[read checksums from the FILEs and check them]' \
|
||
|
'--check[read checksums from the FILEs and check them]' \
|
||
|
'-h[Print help]' \
|
||
|
'--help[Print help]' \
|
||
|
'-V[Print version]' \
|
||
|
'--version[Print version]' \
|
||
|
'*::file:' \
|
||
|
&& ret=0
|
||
|
}
|
||
|
|
||
|
(( $+functions[_b2sum_commands] )) ||
|
||
|
_b2sum_commands() {
|
||
|
local commands; commands=()
|
||
|
_describe -t commands 'b2sum commands' commands "$@"
|
||
|
}
|
||
|
|
||
|
_b2sum "$@"
|