Please, fix batch mode for gpg --edit-key-trust

Dashamir Hoxha dashohoxha at gmail.com
Wed Jul 27 18:32:22 CEST 2016


On Wed, Jul 27, 2016 at 3:46 PM, John Buehrer <john at zuri.ch> wrote:

>
>     $ printf "5\n" | gpg2 --batch --edit-key 67A92459607354C7 trust quit
>

I think that it should work with the option `--command-fd=0`, which tells
gpg2
to get the commands from stdin. See this example:
https://github.com/dashohoxha/egpg/blob/gnupg-2.1/src/cmd/contact/trust.sh#L39


> I'm surprised anything GNU doesn't automatically read input from a
> redirected STDIN,
> that's Unix 101.
>

I totally agree with you on this. This was my reaction too, and beleive it
is the same
for every unix guy that comes across gnupg.

Searching the archives, I see a number of complicated scripting
> work-arounds.
> Maybe I missed the insight somewhere why this simply doesn't "just work" ?
>

If I am allowed to speculate, this happens because gnupg is a very ancient
program,
since the time of dinosaurs. However it is trying to become more modern
lately.
Another reason may be that it has tried to immitate closely OpenPGP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20160727/a4e5c26c/attachment.html>


More information about the Gnupg-users mailing list