43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
#compdef base32
|
|
|
|
autoload -U is-at-least
|
|
|
|
_base32() {
|
|
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[@]}" \
|
|
'-w+[Wrap encoded lines after n characters]: : ' \
|
|
'--wrap=[Wrap encoded lines after n characters]: : ' \
|
|
'-c+[]: :(always ansi auto never)' \
|
|
'--color=[]: :(always ansi auto never)' \
|
|
'-d[Decode rather than encode]' \
|
|
'--decode[Decode rather than encode]' \
|
|
'-i[Ignore whitespace when decoding]' \
|
|
'--ignore-space[Ignore whitespace when decoding]' \
|
|
'-v[output a diagnostic for every file processed]' \
|
|
'--verbose[output a diagnostic for every file processed]' \
|
|
'-q[Do not display header, even with multiple files]' \
|
|
'--quiet[Do not display header, even with multiple files]' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
'*::file:' \
|
|
&& ret=0
|
|
}
|
|
|
|
(( $+functions[_base32_commands] )) ||
|
|
_base32_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'base32 commands' commands "$@"
|
|
}
|
|
|
|
_base32 "$@"
|