mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
e32c575e0f
commit
7732b33288
3 changed files with 64 additions and 40 deletions
|
@ -280,7 +280,7 @@ Check the options for the component @var{component}.
|
|||
Update all configuration files with values taken from the global
|
||||
configuration file (usually @file{/etc/gnupg/gpgconf.conf}).
|
||||
|
||||
@item --list-dirs
|
||||
@item --list-dirs [@var{names}]
|
||||
Lists the directories used by @command{gpgconf}. One directory is
|
||||
listed per line, and each line consists of a colon-separated list where
|
||||
the first field names the directory type (for example @code{sysconfdir})
|
||||
|
@ -288,7 +288,9 @@ and the second field contains the percent-escaped directory. Although
|
|||
they are not directories, the socket file names used by
|
||||
@command{gpg-agent} and @command{dirmngr} are printed as well. Note
|
||||
that the socket file names and the @code{homedir} lines are the default
|
||||
names and they may be overridden by command line switches.
|
||||
names and they may be overridden by command line switches. If
|
||||
@var{names} are given only the directories or file names specified by
|
||||
the list names are printed without any escaping.
|
||||
|
||||
@item --list-config [@var{filename}]
|
||||
List the global configuration file in a colon separated format. If
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue