aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-08-16 00:33:02 -0500
committerRob Landley <rob@landley.net>2021-08-16 00:33:02 -0500
commite22443c6332c7ce2e38b395cd397b9b0da6b5145 (patch)
tree17b0368aa5303f1319f8d8397830e4204071e282
parentf8e28ad07065b55444ba35c0aa0cccd441c4f2bf (diff)
downloadtoybox-e22443c6332c7ce2e38b395cd397b9b0da6b5145.tar.gz
Don't show "toybox" header line for "help" output unless called with no args.
(It still shows it for "ls --help" and bare "help", but not "help ls".)
-rw-r--r--toys/other/help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/help.c b/toys/other/help.c
index ab168c66..1cdbe7e1 100644
--- a/toys/other/help.c
+++ b/toys/other/help.c
@@ -30,7 +30,7 @@ static void do_help(struct toy_list *t)
xprintf("<a name=\"%s\"><h1>%s</h1><blockquote><pre>\n", t->name, t->name);
toys.which = t;
- show_help(stdout, FLAG(h)+!FLAG(u));
+ show_help(stdout, !FLAG(u)+(!!toys.argv[1]<<1));
if (FLAG(h)) xprintf("</blockquote></pre>\n");
}