gpgconf: Enhance --list-dirs.
* tools/gpgconf.c (main) <aListDir>: Factor code out to ... (list_dirs): new. Rewrite to use a table. Allow selection of a items. Add "agent-ssh-socket".
This change makes the use of gpgconf in scripts easier. For example,
to set the envvar with the name of the socket used by ssh, it is now
possible to do this:
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
which guarantees that the right name is used.
- Signed-off-by: Werner Koch <wk@gnupg.org>