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