On Wed, May 03, 2017 at 11:03:42PM +0200, Lukas Jirkovsky wrote: > On 3 May 2017 at 22:35, Stefan Sperling <s...@elego.de> wrote: > > On Wed, May 03, 2017 at 10:05:01PM +0200, Lukas Jirkovsky wrote: > >> New version. Instead of reimplementing the gpg-agent logic, "gpgconf > >> --list-dir agent-socket" is used. If the gpgconf fails, the code falls > >> back to the original solution to stay compatible with old Gnupg > >> versions.
I apologize for not looking into this more before recommending it. The ability to specify a name to --list-dir is very recent (only since 2.1.14). All the other 2.1.x releases, and the entire 2.0.x series, don't support an argument to --list-dir. They just print out all the items. $ gpgconf --list-dir ... agent-socket:/run/user/1000/gnupg/S.gpg-agent ... It's still a stable, easy to parse format, but it does require parsing instead of just using the output directly. Cheers, -- James GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB