mirror of
git://git.gnupg.org/gnupg.git
synced 2025-06-23 21:17:56 +02:00
gpg: New pseudo option full-help for --list-options et al.
* g10/misc.c (parse_options): Implement "full-help". --
This commit is contained in:
parent
5a223303d7
commit
f9bcec6f8a
@ -1563,9 +1563,10 @@ parse_options(char *str,unsigned int *options,
|
|||||||
{
|
{
|
||||||
char *tok;
|
char *tok;
|
||||||
|
|
||||||
if (str && !strcmp (str, "help"))
|
if (str && (!strcmp (str, "help") || !strcmp (str, "full-help")))
|
||||||
{
|
{
|
||||||
int i,maxlen=0;
|
int i,maxlen=0;
|
||||||
|
int full = *str == 'f';
|
||||||
|
|
||||||
/* Figure out the longest option name so we can line these up
|
/* Figure out the longest option name so we can line these up
|
||||||
neatly. */
|
neatly. */
|
||||||
@ -1577,6 +1578,10 @@ parse_options(char *str,unsigned int *options,
|
|||||||
if(opts[i].help)
|
if(opts[i].help)
|
||||||
es_printf("%s%*s%s\n",opts[i].name,
|
es_printf("%s%*s%s\n",opts[i].name,
|
||||||
maxlen+2-(int)strlen(opts[i].name),"",_(opts[i].help));
|
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);
|
g10_exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user