From 2736d11dd320b64c9cdd77bcaecd15756b73d89d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 16 Oct 2013 17:44:20 +1300 Subject: Move TTY/GPG_TTY exports into profile --- sh/profile.d/keychain.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sh') 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 -- cgit v1.2.3