diff options
author | Clint Adams <clint@users.sourceforge.net> | 2008-07-23 00:34:04 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2008-07-23 00:34:04 +0000 |
commit | 4ecc91742cb7005e0031a781d797ca1144316130 (patch) | |
tree | 6ea65fa177f967fa91b6774a55aeace4f082cc21 /Completion/Unix/Command | |
parent | 38e0badcc3c9b1aaf0e518c736c8ec646217fab3 (diff) | |
download | zsh-4ecc91742cb7005e0031a781d797ca1144316130.tar.gz zsh-4ecc91742cb7005e0031a781d797ca1144316130.tar.xz zsh-4ecc91742cb7005e0031a781d797ca1144316130.zip |
25328: fix --recv-keys and --send-keys to complete key IDs instead of uid email addresses.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_gpg | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_gpg b/Completion/Unix/Command/_gpg index 20167a847..074cea700 100644 --- a/Completion/Unix/Command/_gpg +++ b/Completion/Unix/Command/_gpg @@ -34,13 +34,13 @@ _arguments -C -s -S -A "-*" \ '--gen-revoke[generate a revocation certificate]' \ '--desig-revoke[generate a designated revocation certificate]' \ '--export[export all key from all keyrings]' \ - '--send-keys[send keys to a keyserver]:key attachment:->public-keys' \ + '--send-keys[send keys to a keyserver]:key attachment:->public-keyids' \ '--export-all[export all key and not OpenPGP compatible keys]' \ '--export-secret-keys:key attachment:->secret-keys' \ '--export-secret-subkeys:key attachment:->secret-keys' \ '--import[import a gpg key from a file]:_files attachment:_files' \ '--fast-import[import a file without build trustdb]:_files attachment:_files' \ - '--recv-keys[receive a list of keys from a keyserver]:key attachment:->public-keys' \ + '--recv-keys[receive a list of keys from a keyserver]:key attachment:->public-keyids' \ '--refresh-keys[update all keys from a keyserver]' \ '--search-keys[search for keys on a key server]' \ '--update-trustdb[update the trust database]' \ @@ -170,6 +170,10 @@ case "$state" in _wanted ciphers expl cipher compadd \ ${${(s.,.)${(M)${(f)"$(_call_program ciphers gpg $needed --version)"}:#Cipher*}#*:}# } && return ;; + (public-keyids) + _wanted public-keys expl 'public keyid' \ + compadd ${${${(M)${(f)"$(_call_program public-keyids gpg $needed --list-public-keys --list-options no-show-photos 2>/dev/null)"}:%pub*}#pub */}%% *} && return + ;; esac return ret |