Surprising command line options handling

Peter Lebbing peter at digitalbrains.com
Tue Feb 24 12:10:20 CET 2015


On 24/02/15 09:34, Werner Koch wrote:
> No, we can't error out on an arg which looks like an option because that
> may actually be a valid argument.

However, if running interactively and --batch is not specified, might it
be useful to print "Warning: --export-options did not match any key"
with the command line Daniele tried in the OP, so people more quickly
recognise that GnuPG is trying to match it to a key rather than
interpret it as an option? It might save on some struggling and head
scratching...

The warning would also help in other cases. What if I want to export
keys A, B and C, but match B wrongly. GnuPG doesn't complain, and I end
up with a file with exported keys. Only later do I realise B is not
among them...

This surprising command line handling has come up here from time to
time, I'm sure it was discussed before... I just can't remember...

I think this point isn't covered in the FAQ yet. I suggest we come up
with a question and answer that cover this case. Something like "GnuPG
ignores options I specify on the command line!" as a question that isn't
a question. Preferably, we make the answer an answer, though.

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <http://digitalbrains.com/2012/openpgp-key-peter>



More information about the Gnupg-users mailing list