1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| | #compdef gpg-zip
local curcontext="$curcontext" state line expl ret=1
typeset -A opt_args
_arguments -C -s -S -A "-*" \
'(-d --decrypt)'{-e,--encrypt}'[encrypt data]' \
'(-e --encrypt)'{-d,--decrypt}'[decrypt data]' \
'(-c --symmetric)'{-c,--symmetric}'[encrypt with symmetric cypher only]' \
'(-s --sign)'{-s,--sign}'[make a signature]' \
'*'{-r+,--recipient}'[specify user to encrypt for]:recipient:->public-keys' \
'(-u --local-user)'{-u+,--local-user}'[use name as the user ID to sign]:user attachment:_users' \
'(-)--list-archive[list archive contents]' \
'(-o --output)'{-o+,--output}'[write output to file]:output file:_files' \
'--gpg[use specified command instead of gpg]:command:_command_names' \
'--gpg-args[gpg arguments]:gpg arguments:' \
'--tar-args[tar arguments]:tar arguments:' \
'--tar[use specified command instead of tar]:command:_command_names' \
'(-h --help)'{-h,--help}'[display usage information]' \
'--version[print info on program version]' \
'*:files:_files' && ret=0
case "$state" in
public-keys)
_wanted public-keys expl 'public key' \
compadd ${${(Mo)$(_call_program public-keys gpg $needed --list-public-keys --list-options no-show-photos 2>/dev/null):%<*>}//(<|>)/} && return
;;
esac
return ret
|