diff options
author | Werner Koch <[email protected]> | 2023-01-31 10:52:01 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-01-31 10:52:01 +0000 |
commit | f9bcec6f8afa5e23f14d1d1e13cec08b242dac3c (patch) | |
tree | ef20b7b764a3f8396f255330951adbcf22344790 | |
parent | gpg: Make "--list-options show-sig-subpackets=n,m" work again. (diff) | |
download | gnupg-f9bcec6f8afa5e23f14d1d1e13cec08b242dac3c.tar.gz gnupg-f9bcec6f8afa5e23f14d1d1e13cec08b242dac3c.zip |
gpg: New pseudo option full-help for --list-options et al.
* g10/misc.c (parse_options): Implement "full-help".
--
-rw-r--r-- | g10/misc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/g10/misc.c b/g10/misc.c index dcf001877..05d232f8f 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -1563,9 +1563,10 @@ parse_options(char *str,unsigned int *options, { char *tok; - if (str && !strcmp (str, "help")) + if (str && (!strcmp (str, "help") || !strcmp (str, "full-help"))) { int i,maxlen=0; + int full = *str == 'f'; /* Figure out the longest option name so we can line these up neatly. */ @@ -1577,6 +1578,10 @@ parse_options(char *str,unsigned int *options, if(opts[i].help) es_printf("%s%*s%s\n",opts[i].name, maxlen+2-(int)strlen(opts[i].name),"",_(opts[i].help)); + if (full) + for (i=0; opts[i].name; i++) + if(!opts[i].help) + es_printf("%s\n",opts[i].name); g10_exit(0); } |