[Bash-completion-devel] Bug#500316: gpg ID/identities completion is broken
David Paleino
d.paleino at gmail.com
Sat Sep 27 09:17:10 UTC 2008
Package: bash-completion
Version: 20080705
Severity: normal
Tags: confirmed
This is kind of a self-note :)
I was working on implementing gpg2 (#489927), and I just noticed that gpg
completion is not working properly.
In particular, according to the following code:
--@(export|@(?(l|nr|nrl)sign|edit)-key))
# return list of public keys
COMPREPLY=( $( compgen -W "$( gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*/\([^ ]*\).*\(<\([^>]*\)>\).*$@\1 \3 at p')" -- "$cur" ))
return 0
;;
(i.e. lines 6227-6231 of current bzr)
if I do:
$ gpg --edit-key <TAB>
I should get a list of IDs / Identities (i.e. e-mail addresses). This is not
true, since it happens that:
$ gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*/\([^ ]*\).*\(<\([^>]*\)>\).*$@\1 \3 at p'
$
It also seems that the sed regexp is wrong. Splitting it, and omitting "-n"
from sed, we have quite a working list:
$ gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*/\([^ ]*\).*$@\1@;s@^.*\(<\([^>]*\)>\).*$@\2 at p'
d.paleino at gmail.com
aksnah at gmail.com
david.paleino at poste.it
coscienza at tin.it
giuseppe.benigno at egregorion.net
francesco at namuri.it
debdev at tonelli.sns.it
[..]
$
Obviously, this *must* be fixed by adding the IDs completion as well.
I'm prioritizing this as "normal" because it's not really a major bug -- gpg
completion is still usable, even though not at its full power :)
I'll close this bug when I have something working.
Kindly,
David
--
. ''`. Debian maintainer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://snipr.com/qa_page
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20080927/0f6eb93a/attachment-0001.pgp
More information about the Bash-completion-devel
mailing list