Release: STABLE-1-2
Environment
Any. Patch tested and verified on s390-ibm-linux-gnu.
Description
GnuPG does not call the photo viewer when keys are listed in --with-colons mode. The only way to get the image data in this case is to parse the packets sent to the --attribute-fd, which is difficult to do from a shell script (and not properly documented as well -- i.e. how do I properly parse the stream(s) from --status-fd and --attribute-fd?). It would be nice to display photos in this case as well, so I can specify an "image viewer" that echoes a magic word into the --with-colons output or sth. like that.
I have included a patch, however this one does not correctly handle the case when photo ids are enabled in the config file and some software expects --with-colons to be noninteractive. Perhaps --batch-mode should turn off photo viewing again?
How To Repeat
Given a keyring with a key containing a photo ID in it.
gpg --list-keys --with-colons --photo-viewer 'echo %i' --show-photos
Fix
Possible patch attached, please respond if not sufficient.