diff options
author | Denys Vlasenko | 2022-08-30 17:12:34 +0200 |
---|---|---|
committer | Denys Vlasenko | 2022-08-30 17:12:34 +0200 |
commit | dd79e1d4d3b9725e927d1c26e0d3fdb49e29ba9c (patch) | |
tree | 065cd71bdfc38c2c165baf9be0c5fbbb2a4d89d0 /libbb | |
parent | fe73c8d55795a8fe7e95fc2c00af6899817b96b8 (diff) | |
download | busybox-dd79e1d4d3b9725e927d1c26e0d3fdb49e29ba9c.zip busybox-dd79e1d4d3b9725e927d1c26e0d3fdb49e29ba9c.tar.gz |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 9b9d7db..d5335d3 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: */ |