aboutsummaryrefslogtreecommitdiff
path: root/keychain/shrc.d/keychain.sh
diff options
context:
space:
mode:
Diffstat (limited to 'keychain/shrc.d/keychain.sh')
-rw-r--r--keychain/shrc.d/keychain.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/keychain/shrc.d/keychain.sh b/keychain/shrc.d/keychain.sh
new file mode 100644
index 00000000..9a732384
--- /dev/null
+++ b/keychain/shrc.d/keychain.sh
@@ -0,0 +1,4 @@
+# If GPG_AGENT_INFO is set, update GPG_TTY for clean use of pinentry(1) etc
+[ -n "$GPG_AGENT_INFO" ] || return
+GPG_TTY=$(command -p tty) || return
+export GPG_TTY