about summary refs log tree commit diff stats
path: root/src/ui/console.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-07-26 03:01:14 +0100
committerJames Booth <boothj5@gmail.com>2015-07-26 03:01:14 +0100
commitbd32f4dc472b181fdd78c12228313debaaf593d6 (patch)
tree80bc816e7412db3a7b888347a792e58522717be8 /src/ui/console.c
parent2b725f9144570c8848a050dc52b7e9668c5fcde5 (diff)
downloadprofani-tty-bd32f4dc472b181fdd78c12228313debaaf593d6.tar.gz
Show command header in help output
Diffstat (limited to 'src/ui/console.c')
-rw-r--r--src/ui/console.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 027f9e73..a688d5f2 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -111,6 +111,14 @@ cons_show_help(Command *command)
     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("");
 
     win_print(console, '-', NULL, 0, THEME_WHITE_BOLD, "", "Synopsis");
     ui_show_lines(console, command->help.synopsis);
@@ -119,7 +127,6 @@ cons_show_help(Command *command)
     win_print(console, '-', NULL, 0, THEME_WHITE_BOLD, "", "Description");
     win_println(console, command->help.desc);
 
-    int i;
     int maxlen = 0;
     for (i = 0; command->help.args[i][0] != NULL; i++) {
         if (strlen(command->help.args[i][0]) > maxlen)