aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-02-15 13:25:04 +0000
committerRon Yorston <rmy@pobox.com>2020-02-15 13:25:04 +0000
commit0abe89bc214c9d1f16f32c4339792066b875b7c6 (patch)
tree3748f654565bd08513093ebfbb68487f612b5e3f /libbb
parent6885083a7e4f94938ca0a98e2c6c69a84eb08a1f (diff)
parenta6e48dead331c3c19e070992d2d571e74a1d9a8d (diff)
downloadbusybox-w32-0abe89bc214c9d1f16f32c4339792066b875b7c6.tar.gz
busybox-w32-0abe89bc214c9d1f16f32c4339792066b875b7c6.tar.bz2
busybox-w32-0abe89bc214c9d1f16f32c4339792066b875b7c6.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb')
-rw-r--r--libbb/lineedit.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 9bb3ea98b..14eb16873 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -884,18 +884,29 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
884 } 884 }
885 pf_len = strlen(pfind); 885 pf_len = strlen(pfind);
886 886
887# if ENABLE_FEATURE_SH_STANDALONE && NUM_APPLETS != 1
888 if (type == FIND_EXE_ONLY && !dirbuf) { 887 if (type == FIND_EXE_ONLY && !dirbuf) {
888# if ENABLE_FEATURE_SH_STANDALONE && NUM_APPLETS != 1
889 const char *p = applet_names; 889 const char *p = applet_names;
890
891 while (*p) { 890 while (*p) {
892 if (strncmp(pfind, p, pf_len) == 0) 891 if (strncmp(pfind, p, pf_len) == 0)
893 add_match(xstrdup(p)); 892 add_match(xstrdup(p));
894 while (*p++ != '\0') 893 while (*p++ != '\0')
895 continue; 894 continue;
896 } 895 }
897 }
898# endif 896# endif
897# if EDITING_HAS_get_exe_name
898 if (state->get_exe_name) {
899 i = 0;
900 for (;;) {
901 const char *b = state->get_exe_name(i++);
902 if (!b)
903 break;
904 if (strncmp(pfind, b, pf_len) == 0)
905 add_match(xstrdup(b));
906 }
907 }
908# endif
909 }
899 910
900 for (i = 0; i < npaths; i++) { 911 for (i = 0; i < npaths; i++) {
901 DIR *dir; 912 DIR *dir;