#!/bin/sh # TAKEN FROM https://unix.stackexchange.com/a/236747/135796 # choose pinentry depending on PINENTRY_USER_DATA # requires pinentry-curses and pinentry-tty # this *only works* with gpg 2 # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802020 # Fixes the pinentry-tty error https://github.com/neomutt/neomutt/issues/1014 case $PINENTRY_USER_DATA in curses) exec $(brew --prefix)/bin/pinentry-curses "$@" ;; *) exec $(brew --prefix)/bin/pinentry-tty "$@" ;; esac