with the debian 2.2.3-1 package, i'm seeing:
0 dkg@alice:/tmp/cdtemp.KhERQL$ gpg --quick-gen-key 'Test <test@example.net>' futuredefault gpg: Key generation failed: Unknown elliptic curve 2 dkg@alice:/tmp/cdtemp.KhERQL$
with the debian 2.2.3-1 package, i'm seeing:
0 dkg@alice:/tmp/cdtemp.KhERQL$ gpg --quick-gen-key 'Test <test@example.net>' futuredefault gpg: Key generation failed: Unknown elliptic curve 2 dkg@alice:/tmp/cdtemp.KhERQL$
It is
future-default
and not
futuredefault
All unknown strings are taken as EC names and thus the error message.
When i read the manpage, nroff-formatted against an 80-column terminal, it says, literally:
If algo or usage are given, only the primary key is created and no prompts are shown. To specify an expiration date but still create a primary and subkey use ``default'' or ``future- default'' for algo and ``default'' for usage. For a description of these optional arguments see the command --quick-add-key. The usage accepts also the value ``cert'' which can be used to create a certification only primary key; the default is to a
so at least this hyphen should be made a non-breaking hyphen in the documentation.
another reasonable resolution would be if futuredefault were an alias for future-default.
finally, a friendly approach would be to use Levenshtein distance against known labels when an unmatched name appears.
This kind of user-friendliness is not unprecedented. for example:
0 dkg@alice:~$ git sendemail origin/master git: 'sendemail' is not a git command. See 'git --help'. The most similar command is send-email 1 dkg@alice:~$
I added "futuredefault" as an alias and also made the matching case-insensitiv. Changing the rendering is not easy because using a non-breaking hyphen in @code{} would not look very nice.
I considered to print a hint like in git but that would require to write and test quite some new code because git is GPLv2only. Any hints where I can snatch some GPLv2+ code?