lineedit: fix completion with applet names. closes 9361
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 23 Oct 2016 23:25:05 +0000 (01:25 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 23 Oct 2016 23:25:05 +0000 (01:25 +0200)
Patch by Ron Yorston <rmy@pobox.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/lineedit.c

index 3bfff008468be3143003ae26f0147dca0cd3fc05..2cc61db40be2bdc7d0eb86b771506afac44e2bc3 100644 (file)
@@ -782,7 +782,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) {
                const char *p = applet_names;
 
                while (*p) {