1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-23 12:33:01 +02:00

Richard Hartmann: 24631: gpg completion update

This commit is contained in:
Peter Stephenson 2008-03-07 10:43:40 +00:00
parent d70cfd3310
commit 318119bda7
2 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,7 @@
2008-03-07 Peter Stephenson <pws@csr.com>
* Richard Hartmann: 24631: Completion/Unix/Command/_gpg: update.
* 24696: Doc/Zsh/options.yo, Src/options.c: turn off MULTIBYTE
by default in sh emulation.

View File

@ -19,7 +19,8 @@ _arguments -C -s -S -A "-*" \
'--list-public-keys[list all public keys]' \
'--list-secret-keys[list all secret keys]' \
'--list-sigs[lists keys and signatures]:key attachment:->public-keys' \
'--check-sigs[lists key, signatures and check them]:key attachment:->public-keys' \
'--list-options[modify what the various --list-* commands show]' \
'--check-sigs[list key, signatures and check them]:key attachment:->public-keys' \
'--fingerprint[list all keys with their fingerprints]:key attachment:->public-keys' \
'--list-packets[list only the sequence of packets]' \
'--gen-key[generate a new pair key]' \
@ -130,7 +131,7 @@ _arguments -C -s -S -A "-*" \
'*:args:->args' && ret=0
if [[ $state = args ]]; then
if (( ${+opt_args[--export]} || ${+opt_args[--list-keys]} )); then
if (( ${+opt_args[--export]} || ${+opt_args[--list-keys]} || ${+opt_args[--list-public-keys]} )); then
state=public-keys
elif (( ${+opt_args[--list-secret-keys]} )); then
state=secret-keys
@ -159,11 +160,11 @@ fi
case "$state" in
public-keys)
_wanted public-keys expl 'public key' \
compadd ${${(Mo)$(_call_program public-keys gpg $needed --list-keys 2>/dev/null):%<*>}//(<|>)/} && return
compadd ${${(Mo)$(_call_program public-keys gpg $needed --list-public-keys --list-options no-show-photos 2>/dev/null):%<*>}//(<|>)/} && return
;;
secret-keys)
_wanted secret-keys expl 'secret key' compadd \
${${(Mo)$(_call_program secret-keys gpg $needed --list-secret-keys 2>/dev/null):%<*>}//(<|>)/} && return
${${(Mo)$(_call_program secret-keys gpg $needed --list-secret-keys --list-options no-show-photos 2>/dev/null):%<*>}//(<|>)/} && return
;;
ciphers)
_wanted ciphers expl cipher compadd \