Don't ignore files starting with . in tab complete if we asked for them

This commit is contained in:
K. Lange 2018-09-14 23:01:55 +09:00
parent 8fcf56f716
commit 405834ec89

View File

@ -436,7 +436,7 @@ void tab_complete_func(rline_context_t * c) {
struct dirent * ent = readdir(dirp);
while (ent != NULL) {
if (ent->d_name[0] != '.') {
if (ent->d_name[0] != '.' || compare[0] == '.') {
if (!word || strstr(ent->d_name, compare) == ent->d_name) {
struct stat statbuf;
/* stat it */