From 7b0ea0a21fb2d97c7bd24987f8ccf27548c0b004 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 28 Oct 2020 17:03:37 -0500 Subject: Tweak help text again. --- toys/other/help.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'toys/other') diff --git a/toys/other/help.c b/toys/other/help.c index 179dd4e7..ab168c66 100644 --- a/toys/other/help.c +++ b/toys/other/help.c @@ -30,13 +30,13 @@ static void do_help(struct toy_list *t) xprintf("

%s

\n", t->name, t->name);
 
   toys.which = t;
-  show_help(stdout, !FLAG(u));
+  show_help(stdout, FLAG(h)+!FLAG(u));
 
   if (FLAG(h)) xprintf("
\n"); } -// The simple help is just toys.which = toy_find("name"); show_help(stdout); -// But iterating through html output and all commands is a big more +// Simple help is just toys.which = toy_find("name"); show_help(stdout, 1); +// but iterating through html output and all commands is a bit more void help_main(void) { @@ -62,10 +62,11 @@ void help_main(void) } if (FLAG(h)) { - xprintf("\nToybox command list\n\n

\n"); + sprintf(toybuf, "Toybox %s command help", toybox_version); + xprintf("\n%s\n\n

%s


", + toybuf, toybuf); for (i=0; i < toys.toycount; i++) - xprintf("%s\n\n", toy_list[i].name, - toy_list[i].name); + xprintf("%s \n", toy_list[i].name, toy_list[i].name); xprintf("

\n"); } -- cgit v1.2.3