if (( ! $+commands[gpg] )); then return 1 fi # Inform gpg-agent of the current TTY for user prompts. export GPG_TTY="$(tty)" if [[ -n "$SSH_CONNECTION" ]]; then export PINENTRY_USER_DATA="curses" fi