mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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
|
@ -815,7 +815,7 @@ it by adding this to your init script:
|
|||
@example
|
||||
unset SSH_AGENT_PID
|
||||
if [ "$@{gnupg_SSH_AUTH_SOCK_by:-0@}" -ne $$ ]; then
|
||||
export SSH_AUTH_SOCK="$@{HOME@}/.gnupg/S.gpg-agent.ssh"
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
fi
|
||||
@end example
|
||||
@end cartouche
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue