From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1306 invoked from network); 31 Jul 2006 14:09:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Jul 2006 14:09:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 28177 invoked from network); 31 Jul 2006 14:08:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Jul 2006 14:08:53 -0000 Received: (qmail 21776 invoked by alias); 31 Jul 2006 14:08:41 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10565 Received: (qmail 21765 invoked from network); 31 Jul 2006 14:08:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Jul 2006 14:08:38 -0000 Received: (qmail 26911 invoked from network); 31 Jul 2006 14:08:38 -0000 Received: from parhelion.firedrake.org (193.201.200.77) by a.mx.sunsite.dk with SMTP; 31 Jul 2006 14:08:36 -0000 Received: from phil by parhelion.firedrake.org with local (Exim 4.50 #1 (Debian)) id 1G7YRd-0002iE-Mj for ; Mon, 31 Jul 2006 15:08:33 +0100 Date: Mon, 31 Jul 2006 16:08:33 +0200 From: Phil Pennock To: zsh-users@sunsite.dk Subject: Re: [BUG] zsh gpg completion does not recognize gpg --keyring Message-ID: <20060731140833.GA9283@parhelion.globnix.org> Mail-Followup-To: zsh-users@sunsite.dk References: <87zmeqr2d4.fsf@vertex.dottedmag.net> <20060731113732.4c595080.pws@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060731113732.4c595080.pws@csr.com> Sender: Phil Pennock On 2006-07-31 at 11:37 +0100, Peter Stephenson wrote: > Mikhail Gusarov wrote: > > Autocomplete in commang 'gpg --no-default-keyring --keyring > > /some/key/ring' gives me userids from my default keyring (~/.gnupg), > > not from the specified in the command line. > > I think the following fixes it, but I don't have a gpg setup to use for > testing, so I haven't confirmed the effect (though I did test the code I > added). Luckily, somebody cleverly wrote gpg with just the structure > needed for this addition. Does it help if I also point out that they've gone one better and gpg has the --with-colons option, to produce colon-delimited field output specifically for scripts? :^) % gpg --with-colons --list-keys 3903637F 4CE4F655 2>/dev/null tru:o:0:1153919143:1154174024:3:1:5 pub:u:1024:17:403043153903637F:2004-03-29:2007-03-29::u:Phil Pennock ::scaESCA: uid:u::::2004-09-01::84F2EA62EC251939C5890450B9C30F448B749AAD::Phil Pennock : uid:u::::2006-06-01::96009DC93F78E37280D361FBF8A2E322F1F22E60::Phil Pennock : sub:u:1024:16:BD53847773FD5F8D:2004-03-29:2007-03-29:::::e: pub:u:1024:17:7C34B4E14CE4F655:2001-08-03:2007-09-06::u:Phil Pennock ::scaESCA: sub:e:1024:16:467EFEE7212AE5CD:2001-08-03:2003-08-03:::::e: sub:u:1024:17:B22750EBD749B12B:2004-09-06:2007-09-06:::::s: sub:u:2048:1:3FA36DE2A4C8B523:2006-06-14:2008-06-13:::::e: (If you have the PGP keys, you can obviously see the real addresses; I just blocked them above to limit the spam to some lesser-spammed addresses.) --with-colons Print key listings delimited by colons. Note that the output will be encoded in UTF-8 regardless of any --display-charset setting. This format is useful when GnuPG is called from scripts and other programs as it is easily machine parsed. The details of this format are documented in the file doc/DETAILS, which is included in the GnuPG source distribu- tion. Regards, -- VISTA: Viruses, Infections, Spyware, Trojans & Adware