zsh-workers
 help / color / mirror / code / Atom feed
* Re: Bug#491742: zsh: gpg --send-keys completion is broken
       [not found] <20080721192255.3541.52320.reportbug@localhost>
@ 2008-07-23  0:29 ` Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2008-07-23  0:29 UTC (permalink / raw)
  To: Magnus Therning, 491742; +Cc: zsh-workers

On Mon, Jul 21, 2008 at 08:22:55PM +0100, Magnus Therning wrote:
> `gpg --send-keys` completion completes on UIDs, but the command expects
> a key ID:
> 
> % gpg --send-keys magnus@therning.org
> gpg: "magnus@therning.org" not a key ID: skipping

Try this.

Index: Completion/Unix/Command/_gpg
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_gpg,v
retrieving revision 1.8
diff -u -r1.8 _gpg
--- Completion/Unix/Command/_gpg	7 Mar 2008 10:43:40 -0000	1.8
+++ Completion/Unix/Command/_gpg	23 Jul 2008 00:28:22 -0000
@@ -34,13 +34,13 @@
   '--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 @@
     _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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-23  0:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20080721192255.3541.52320.reportbug@localhost>
2008-07-23  0:29 ` Bug#491742: zsh: gpg --send-keys completion is broken Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).