about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-07-23 00:34:04 +0000
committerClint Adams <clint@users.sourceforge.net>2008-07-23 00:34:04 +0000
commit4ecc91742cb7005e0031a781d797ca1144316130 (patch)
tree6ea65fa177f967fa91b6774a55aeace4f082cc21
parent38e0badcc3c9b1aaf0e518c736c8ec646217fab3 (diff)
downloadzsh-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.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_gpg8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bf702d73a..f661f74f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-23  Clint Adams  <clint@zsh.org>
+
+	* 25328: Completion/Unix/Command/_gpg: fix --recv-keys and
+	--send-keys to complete key IDs instead of uid email addresses.
+
 2008-07-21  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* unposted: Src/Modules/.distfiles: add missing files.
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