diff options
author | Rob Landley <rob@landley.net> | 2016-08-13 17:50:54 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-08-13 17:50:54 -0500 |
commit | e98089ab9a4b52664e8baf1168af0ad0b32398ba (patch) | |
tree | 927101b65a18c955a6d41fcad707954c04496836 /main.c | |
parent | bc1ccaccb5b7ec71775a5eb7e529bb93811956ce (diff) | |
download | toybox-e98089ab9a4b52664e8baf1168af0ad0b32398ba.tar.gz |
Add TOYFLAG_NOHELP to disable --help processing for individual commands,
apply it to "true" and "false".
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -75,7 +75,9 @@ static void toy_singleinit(struct toy_list *which, char *argv[]) if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "C"+!!(which->flags & TOYFLAG_LOCALE)); - if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) { + if (CFG_TOYBOX_HELP_DASHDASH && !(which->flags & TOYFLAG_NOHELP) + && argv[1] && !strcmp(argv[1], "--help")) + { if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2]) if (!(toys.which = toy_find(toys.argv[2]))) return; show_help(stdout); |