Right-align short options in pki usage
This commit is contained in:
+5
-7
@@ -168,7 +168,6 @@ void command_register(command_t command)
|
|||||||
int command_usage(char *error)
|
int command_usage(char *error)
|
||||||
{
|
{
|
||||||
FILE *out = stdout;
|
FILE *out = stdout;
|
||||||
char buf[64];
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
@@ -182,8 +181,8 @@ int command_usage(char *error)
|
|||||||
{
|
{
|
||||||
for (i = 0; cmds[i].cmd; i++)
|
for (i = 0; cmds[i].cmd; i++)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "--%s (-%c)", cmds[i].cmd, cmds[i].op);
|
fprintf(out, " pki --%-6s (-%c) %s\n",
|
||||||
fprintf(out, " pki %-14s %s\n", buf, cmds[i].description);
|
cmds[i].cmd, cmds[i].op, cmds[i].description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -202,10 +201,9 @@ int command_usage(char *error)
|
|||||||
}
|
}
|
||||||
for (i = 0; cmds[active].options[i].name; i++)
|
for (i = 0; cmds[active].options[i].name; i++)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "--%s (-%c)",
|
fprintf(out, " --%-8s (-%c) %s\n",
|
||||||
cmds[active].options[i].name, cmds[active].options[i].op);
|
cmds[active].options[i].name, cmds[active].options[i].op,
|
||||||
fprintf(out, " %-15s %s\n",
|
cmds[active].options[i].desc);
|
||||||
buf, cmds[active].options[i].desc);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return error != NULL;
|
return error != NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user