When tab-completing commands in standalone shell mode don't search the
list of applet names if the command includes a path separator.

v2:
  Drop special treatment of "busybox"

Signed-off-by: Ron Yorston <r...@pobox.com>
---
 libbb/lineedit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 3e62f46..73317e6 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -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 (type == FIND_EXE_ONLY) {
+       if (type == FIND_EXE_ONLY && dirbuf == NULL) {
                const char *p = applet_names;
 
                while (*p) {
-- 
2.5.5

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to