aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-10-16 17:44:20 +1300
committerTom Ryder <tom@sanctum.geek.nz>2013-10-16 17:44:20 +1300
commit2736d11dd320b64c9cdd77bcaecd15756b73d89d (patch)
tree7c29920694b55102dfdf01debc5a0c022794156c /sh
parentAdd completion for GnuPG (diff)
downloaddotfiles-2736d11dd320b64c9cdd77bcaecd15756b73d89d.tar.gz
dotfiles-2736d11dd320b64c9cdd77bcaecd15756b73d89d.zip
Move TTY/GPG_TTY exports into profile
Diffstat (limited to 'sh')
-rw-r--r--sh/profile.d/keychain.sh7
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