[pass] [PATCH] GPG improvements

Jason A. Donenfeld Jason at zx2c4.com
Sat Mar 22 05:06:21 CET 2014

This seems to have some X_SELECTION business in it. Perhaps you had
your own private patch for this, and didn't bother rebasing against
the current master, that has this
applied to it since about 44 hours ago. Sorry about all the churn --
waking up from a deep password-store slumber and applying tons of
patches right and left, so... I imagine it's hard to keep things
rebased on top.

> +[[ -n `which gpg2` ]] && GPG=gpg2

This should be [[ -n $(which gpg2) ]]

> +[[ -n "$GPG_AGENT_INFO" ]] && GPG_OPTS="$GPG_OPTS --batch"

So I like that. It makes perfect sense if --batch is *only* useful
when there's a gpg agent. But IIRC, can't gpg2 operate in --batch mode
and talk to the agent without needing that env var? Wouldn't an easier
way to do this be:

if [[ -n $(which gpg2) ]]; then
   GPG_OPTS="$GPG_OPTS --batch"

Or is there some problem with deciding that way that I'm missing?
(Such as gpg2 being installed without a /usr/bin/gpg2 but only
/usr/bin/gpg??) Let me know.

More information about the Password-Store mailing list