Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-08-30 18:12:34 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2022-08-30 18:12:34 +0300
commitdd79e1d4d3b9725e927d1c26e0d3fdb49e29ba9c (patch)
tree065cd71bdfc38c2c165baf9be0c5fbbb2a4d89d0 /libbb
parentfe73c8d55795a8fe7e95fc2c00af6899817b96b8 (diff)
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>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 9b9d7dbd6..d5335d353 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -938,6 +938,9 @@ void FAST_FUNC show_usage_if_dash_dash_help(int applet_no, char **argv)
# if defined APPLET_NO_echo
&& applet_no != APPLET_NO_echo
# endif
+# if ENABLE_TEST1 || ENABLE_TEST2
+ && argv[0][0] != '[' /* exclude [ --help ] and [[ --help ]] too */
+# endif
) {
if (argv[1] && strcmp(argv[1], "--help") == 0) {
/* Make "foo --help [...]" exit with 0: */