diff --git a/src/tab.rs b/src/tab.rs index cf6ad16..dd1e7a4 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -346,6 +346,10 @@ fn tab_complete(path: &Path) -> Result, Box> { let Some(file_name) = file_name_os.to_str() else { continue; }; + // Don't list hidden files before entering a pattern + if pattern == "^" && file_name.starts_with('.') { + continue; + } if regex.is_match(file_name) { completions.push((file_name.to_string(), entry.path())); }