aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-06-18 08:57:07 -0500
committerRob Landley <rob@landley.net>2021-06-18 08:57:07 -0500
commit29e7ed94a1fe2836d38960b9b3ab3e3b7e61c791 (patch)
treedb99e26587f20bc129add53e7c236ea31c5e55f1 /lib
parent39f64538c2f5f56918d3352bc8a03aae6be0d1d9 (diff)
downloadtoybox-29e7ed94a1fe2836d38960b9b3ab3e3b7e61c791.tar.gz
Second attempt at making --help work with alias ls="ls --color"
Diffstat (limited to 'lib')
-rw-r--r--lib/args.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/args.c b/lib/args.c
index ef23cc07..ba8b465c 100644
--- a/lib/args.c
+++ b/lib/args.c
@@ -426,6 +426,9 @@ void get_optflags(void)
continue;
}
+ if (CFG_TOYBOX_HELP_DASHDASH && !(toys.which->flags&TOYFLAG_NOHELP))
+ check_help(toys.argv+gof.argc);
+
// do we match a known --longopt?
for (lo = gof.longopts; lo; lo = lo->next) {
if (!strncmp(gof.arg, lo->str, lo->len)) {