← Commit list

8506dd673

Ron Yorston
Ron Yorston
2020-12-16
SUCCESS Duration: 153s

Subject

lineedit: omit directories when tab-completing from PATH

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/lineedit.c+3 -0
@@ -871,6 +871,9 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
strcpy(found, name_found);
if (S_ISDIR(st.st_mode)) {
+ /* skip directories if searching PATH */
+ if (type == FIND_EXE_ONLY && !dirbuf)
+ goto cont;
/* name is a directory, add slash */
found[len] = '/';
found[len + 1] = '\0';