mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-09 21:28:51 +01:00
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 by7249ab0f95
. 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> 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 by7249ab0f95
. 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>
This commit is contained in:
parent
f2b276dffb
commit
f31120a5aa
@ -728,9 +728,9 @@ static ARGPARSE_OPTS opts[] = {
|
||||
ARGPARSE_s_n (oWithKeyData,"with-key-data", "@"),
|
||||
ARGPARSE_s_n (oWithSigList,"with-sig-list", "@"),
|
||||
ARGPARSE_s_n (oWithSigCheck,"with-sig-check", "@"),
|
||||
ARGPARSE_s_n (aListKeys, "list-key", "@"), /* alias */
|
||||
ARGPARSE_s_n (aListSigs, "list-sig", "@"), /* alias */
|
||||
ARGPARSE_s_n (aCheckKeys, "check-sig", "@"), /* alias */
|
||||
ARGPARSE_c (aListKeys, "list-key", "@"), /* alias */
|
||||
ARGPARSE_c (aListSigs, "list-sig", "@"), /* alias */
|
||||
ARGPARSE_c (aCheckKeys, "check-sig", "@"), /* alias */
|
||||
ARGPARSE_s_n (oSkipVerify, "skip-verify", "@"),
|
||||
ARGPARSE_s_n (oSkipHiddenRecipients, "skip-hidden-recipients", "@"),
|
||||
ARGPARSE_s_n (oNoSkipHiddenRecipients, "no-skip-hidden-recipients", "@"),
|
||||
|
Loading…
Reference in New Issue
Block a user