aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/keychain.bash5
-rw-r--r--sh/profile.d/keychain.sh5
2 files changed, 4 insertions, 6 deletions
diff --git a/bash/bashrc.d/keychain.bash b/bash/bashrc.d/keychain.bash
index cae44983..92b3e020 100644
--- a/bash/bashrc.d/keychain.bash
+++ b/bash/bashrc.d/keychain.bash
@@ -1,6 +1,5 @@
# If TTY/GPG_TTY are set, update them
-if [[ $TTY || $GPG_TTY ]]; then
- TTY=$(tty)
- GPG_TTY=$TTY
+if [[ $GPG_TTY ]]; then
+ GPG_TTY=$(tty)
fi
diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh
index ae7aa95a..e4733aff 100644
--- a/sh/profile.d/keychain.sh
+++ b/sh/profile.d/keychain.sh
@@ -11,9 +11,8 @@ if command -v keychain >/dev/null 2>&1; then
# Set and export TTY/GPG_TTY for interactive shells
if [ -t 0 ]; then
- TTY=$(tty)
- GPG_TTY=$TTY
- export TTY GPG_TTY
+ GPG_TTY=$(tty)
+ export GPG_TTY
fi
fi