diff options
Diffstat (limited to 'sh/profile.d')
-rw-r--r-- | sh/profile.d/keychain.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh index 08a34d86..ae7aa95a 100644 --- a/sh/profile.d/keychain.sh +++ b/sh/profile.d/keychain.sh @@ -8,5 +8,12 @@ fi if command -v keychain >/dev/null 2>&1; then eval "$(TERM=${TERM:-ansi} keychain \ --eval --ignore-missing --quiet id_dsa id_rsa id_ecsda)" + + # Set and export TTY/GPG_TTY for interactive shells + if [ -t 0 ]; then + TTY=$(tty) + GPG_TTY=$TTY + export TTY GPG_TTY + fi fi |