Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] zsh gpg completion does not recognize gpg --keyring



On 2006-07-31 at 11:37 +0100, Peter Stephenson wrote:
> Mikhail Gusarov <dottedmag@xxxxxxxxxxxxx> 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 <phil.pennock@xxxxxxxxxxx>::scaESCA:
uid:u::::2004-09-01::84F2EA62EC251939C5890450B9C30F448B749AAD::Phil Pennock <censored@xxxxxxxxxxxx>:
uid:u::::2006-06-01::96009DC93F78E37280D361FBF8A2E322F1F22E60::Phil Pennock <censored@xxxxxxxxxxxx>:
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 <censored@xxxxxxxxxxxxxxxxx>::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



Messages sorted by: Reverse Date, Date, Thread, Author