Page MenuHome GnuPG

When listing keys, --keyid-format option is ignored when --with-colons is used
Closed, ResolvedPublic

Description

The following commands output identical results:
gpg --list-keys --with-colons
gpg --list-keys --with-colons --keyid-format 0xshort

KeyID field is always shown with 16 digits (long format). --keyid-format is
being ignored.

However, without --with-colons, the keyID format is respected and the output is
different:

gpg --list-keys
gpg --list-keys --keyid-format 0xshort

Details

Version
1.4.10

Event Timeline

werner claimed this task.
werner added projects: Not A Bug, gnupg.

That is not a bug. --with-colons is the machine interface and it does not
return abbreviated information as the human readable output does.

If this behavior is by design, could at least documentation (man page or
/usr/share/doc) be updated to say so? Some notice in either (or both)
--with-colons and --keyid-format entry saying that --keyid-format (and possibly
others) will be ignored when --with-colons is used.

That would improve documentation and prevent similar reports in the future.

Okay, I'll add a note to the option.