From 1d170da33be908c742a0840191533fe90b82db5b Mon Sep 17 00:00:00 2001 From: Mikko Koivunalho Date: Fri, 31 May 2019 15:45:59 +0300 Subject: [PATCH] Automatically recognise gpg-agent if available Man page says: [..] OPTIONS --agents list tart the agents listed. By default keychain will build the list automatically based on the existence of ssh-agent and/or gpg-agent on the system. The list should be comma-separated, for example "gpg,ssh" [..] Only ssh was supported. Now both. Signed-off-by: Mikko Koivunalho --- keychain.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keychain.sh b/keychain.sh index f6d9ac4..12b8fb5 100755 --- a/keychain.sh +++ b/keychain.sh @@ -960,7 +960,7 @@ setagents() { done agentsopt="${new_agentsopt}" else - for a in ssh; do + for a in ssh gpg; do command -v ${a}-agent >/dev/null || continue agentsopt="${agentsopt+$agentsopt }${a}" done