Set the GPG_TTY if not set

This commit is contained in:
2020-12-23 23:58:48 +08:00
parent 7e832daf77
commit 8c49722513
2 changed files with 10 additions and 0 deletions

View File

@@ -115,3 +115,8 @@ if ! shopt -oq posix; then
. /etc/bash_completion
fi
fi
# set GPG TTY
if [ "$GPG_TTY" = "" ]; then
export GPG_TTY=$(tty)
fi

View File

@@ -71,3 +71,8 @@ SAVEHIST=$HISTSIZE
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt HIST_BEEP # Beep when accessing nonexistent history.
setopt HIST_LEX_WORDS # parse quotes when parsing history
# set GPG_TTY
if [ "$GPG_TTY" = "" ]; then
export GPG_TTY=$(tty)
fi