fix [ --help ] and [[ --help ]]

function                                             old     new   delta
show_usage_if_dash_dash_help                          72      79      +7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2022-08-30 17:12:34 +02:00
parent fe73c8d557
commit dd79e1d4d3

View File

@ -937,6 +937,9 @@ void FAST_FUNC show_usage_if_dash_dash_help(int applet_no, char **argv)
# endif # endif
# if defined APPLET_NO_echo # if defined APPLET_NO_echo
&& applet_no != APPLET_NO_echo && applet_no != APPLET_NO_echo
# endif
# if ENABLE_TEST1 || ENABLE_TEST2
&& argv[0][0] != '[' /* exclude [ --help ] and [[ --help ]] too */
# endif # endif
) { ) {
if (argv[1] && strcmp(argv[1], "--help") == 0) { if (argv[1] && strcmp(argv[1], "--help") == 0) {