shell: make standalone shell tab-complete "busybox"

function                                             old     new   delta
busybox_main                                           -     624    +624
packed_usage                                       31758   31777     +19
applet_names                                        2638    2646      +8
applet_main                                         1528    1532      +4
applet_install_loc                                   191     192      +1
run_applet_and_exit                                  681      78    -603
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/1 up/down: 656/-603)           Total: 53 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-07-29 00:59:24 +02:00
parent be366e5afa
commit f128bdbbd7
2 changed files with 21 additions and 6 deletions

View File

@@ -776,7 +776,7 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
}
pf_len = strlen(pfind);
#if ENABLE_FEATURE_SH_STANDALONE && NUM_APPLETS != 1
# if ENABLE_FEATURE_SH_STANDALONE && NUM_APPLETS != 1
if (type == FIND_EXE_ONLY && !dirbuf) {
const char *p = applet_names;
@@ -787,7 +787,7 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
continue;
}
}
#endif
# endif
for (i = 0; i < npaths; i++) {
DIR *dir;