Home GnuPG
Diffusion GnuPG f31120a5aa40

gpg: Fix aliases --list-key, --list-sig, and --check-sig.
f31120a5aa40Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Fix aliases --list-key, --list-sig, and --check-sig.

* g10/gpg.c (opts): Define commands with ARGPARSE_c
instead of ARGPARSE_s_n.

These three entries are commands, but they're being treated as a
string-based option for some reason. However, if you try to use them
concurrently with another command like --clearsign, you'll get "gpg:
conflicting commands".

Furthermore, because they're marked as options, their flags differ
from the commands that they alias, they cause ambiguity in
abbreviation (e.g. try "gpg --list-ke") which should have been fixed
by 7249ab0f95d1f6cb8ee61eefedc79801bb56398f.

Marking them explicitly as commands for argparse should be more
accurate and should resolve the abbreviation ambiguity issue.

gpg: fix aliases --list-key, --list-sig, and --check-sig.

  • g10/gpg.c: ARGPARSE_OPTS opts[]: define commands with ARGPARSE_c

instead of ARGPARSE_s_n.

These three entries are commands, but they're being treated as a
string-based option for some reason. However, if you try to use them
concurrently with another command like --clearsign, you'll get "gpg:
conflicting commands".

Furthermore, because they're marked as options, their flags differ
from the commands that they alias, they cause ambiguity in
abbreviation (e.g. try "gpg --list-ke") which should have been fixed
by 7249ab0f95d1f6cb8ee61eefedc79801bb56398f.

Marking them explicitly as commands for argparse should be more
accurate and should resolve the abbreviation ambiguity issue.

  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

Details

Provenance
dkgAuthored on Feb 4 2017, 7:23 AM
wernerCommitted on Feb 5 2017, 6:05 PM
Parents
rGf2b276dffbe2: doc: Clarify abbreviation of --help.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rGf31120a5aa40: gpg: Fix aliases --list-key, --list-sig, and --check-sig. (authored by Daniel Kahn Gillmor <dkg@fifthhorseman.net>).Feb 5 2017, 6:05 PM