mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 10:06:21 +00:00
Show command header in help output
This commit is contained in:
@@ -110,6 +110,14 @@ cons_show_help(Command *command)
|
|||||||
{
|
{
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
|
|
||||||
|
cons_show("");
|
||||||
|
win_vprint(console, '-', NULL, 0, THEME_WHITE_BOLD, "", "%s", &command->cmd[1]);
|
||||||
|
win_print(console, '-', NULL, NO_EOL, THEME_WHITE_BOLD, "", "");
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < strlen(command->cmd) - 1 ; i++) {
|
||||||
|
win_print(console, '-', NULL, NO_EOL | NO_DATE, THEME_WHITE_BOLD, "", "-");
|
||||||
|
}
|
||||||
|
win_print(console, '-', NULL, NO_DATE, THEME_WHITE_BOLD, "", "");
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
|
||||||
win_print(console, '-', NULL, 0, THEME_WHITE_BOLD, "", "Synopsis");
|
win_print(console, '-', NULL, 0, THEME_WHITE_BOLD, "", "Synopsis");
|
||||||
@@ -119,7 +127,6 @@ cons_show_help(Command *command)
|
|||||||
win_print(console, '-', NULL, 0, THEME_WHITE_BOLD, "", "Description");
|
win_print(console, '-', NULL, 0, THEME_WHITE_BOLD, "", "Description");
|
||||||
win_println(console, command->help.desc);
|
win_println(console, command->help.desc);
|
||||||
|
|
||||||
int i;
|
|
||||||
int maxlen = 0;
|
int maxlen = 0;
|
||||||
for (i = 0; command->help.args[i][0] != NULL; i++) {
|
for (i = 0; command->help.args[i][0] != NULL; i++) {
|
||||||
if (strlen(command->help.args[i][0]) > maxlen)
|
if (strlen(command->help.args[i][0]) > maxlen)
|
||||||
|
|||||||
Reference in New Issue
Block a user