${+DISPLAY} + ${+WAYLAND_DISPLAY} == 0))
# XXX: don't know if gpg-agent supports comments after directives
# XXX: path could have #
+ # XXX: we are assuming this is our pinentry from .local/bin
sed -Ei 's#^([[:space:]]*pinentry-program[[:space:]]).*$#\1'${commands[pinentry]:-/dev/null}'#' \
- ${GNUPGHOME:-~/.gnupg}/gpg-agent.conf
+ ${GNUPGHOME:-~/.gnupg}/gpg-agent.conf 2>/dev/null
# XXX: could check for changes before doing this to save perf
gpg-connect-agent RELOADAGENT UPDATESTARTUPTTY /bye >/dev/null 2>&1
if {$p} {