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
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-08-16 09:53:42 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2021-08-16 09:53:42 +0300
commit59243a86d97b793bd4e2c98911fd3a7e41af34c4 (patch)
tree0777d6366697e68b30a982cb19baf7de7a4e1cc9
parent8e8cea2a1bc5cf0550f6032abc30593d9a62e58c (diff)
busybox: fix "busybox --help busybox" not showing correct text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/appletlib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 2feed64dd..14be33603 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -893,7 +893,11 @@ int busybox_main(int argc UNUSED_PARAM, char **argv)
if (strcmp(argv[1], "--help") == 0) {
/* "busybox --help [<applet>]" */
- if (!argv[2])
+ if (!argv[2]
+# if ENABLE_FEATURE_SH_STANDALONE && ENABLE_FEATURE_TAB_COMPLETION
+ || strcmp(argv[2], "busybox") == 0 /* prevent getting "No help available" */
+# endif
+ )
goto help;
/* convert to "<applet> --help" */
applet_name = argv[0] = argv[2];