1 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2 Date: Sat, 4 Feb 2017 01:23:32 -0500
3 Subject: gpg: Fix aliases --list-key, --list-sig, and --check-sig.
5 * g10/gpg.c (opts): Define commands with ARGPARSE_c
6 instead of ARGPARSE_s_n.
10 These three entries are commands, but they're being treated as a
11 string-based option for some reason. However, if you try to use them
12 concurrently with another command like --clearsign, you'll get "gpg:
13 conflicting commands".
15 Furthermore, because they're marked as options, their flags differ
16 from the commands that they alias, they cause ambiguity in
17 abbreviation (e.g. try "gpg --list-ke") which should have been fixed
18 by 7249ab0f95d1f6cb8ee61eefedc79801bb56398f.
20 Marking them explicitly as commands for argparse should be more
21 accurate and should resolve the abbreviation ambiguity issue.
23 Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
24 gpg: fix aliases --list-key, --list-sig, and --check-sig.
26 * g10/gpg.c: ARGPARSE_OPTS opts[]: define commands with ARGPARSE_c
27 instead of ARGPARSE_s_n.
31 These three entries are commands, but they're being treated as a
32 string-based option for some reason. However, if you try to use them
33 concurrently with another command like --clearsign, you'll get "gpg:
34 conflicting commands".
36 Furthermore, because they're marked as options, their flags differ
37 from the commands that they alias, they cause ambiguity in
38 abbreviation (e.g. try "gpg --list-ke") which should have been fixed
39 by 7249ab0f95d1f6cb8ee61eefedc79801bb56398f.
41 Marking them explicitly as commands for argparse should be more
42 accurate and should resolve the abbreviation ambiguity issue.
44 Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
45 (cherry picked from commit f31120a5aa40b6e4e89d41d1d5d34e0f7da173b4)
48 1 file changed, 3 insertions(+), 3 deletions(-)
50 diff --git a/g10/gpg.c b/g10/gpg.c
51 index f9039ae..e280c22 100644
54 @@ -728,9 +728,9 @@ static ARGPARSE_OPTS opts[] = {
55 ARGPARSE_s_n (oWithKeyData,"with-key-data", "@"),
56 ARGPARSE_s_n (oWithSigList,"with-sig-list", "@"),
57 ARGPARSE_s_n (oWithSigCheck,"with-sig-check", "@"),
58 - ARGPARSE_s_n (aListKeys, "list-key", "@"), /* alias */
59 - ARGPARSE_s_n (aListSigs, "list-sig", "@"), /* alias */
60 - ARGPARSE_s_n (aCheckKeys, "check-sig", "@"), /* alias */
61 + ARGPARSE_c (aListKeys, "list-key", "@"), /* alias */
62 + ARGPARSE_c (aListSigs, "list-sig", "@"), /* alias */
63 + ARGPARSE_c (aCheckKeys, "check-sig", "@"), /* alias */
64 ARGPARSE_s_n (oSkipVerify, "skip-verify", "@"),
65 ARGPARSE_s_n (oSkipHiddenRecipients, "skip-hidden-recipients", "@"),
66 ARGPARSE_s_n (oNoSkipHiddenRecipients, "no-skip-hidden-recipients", "@"),