Skip to content

Commit da831cf

Browse files
p5quaredlaperlej
authored andcommitted
feat: whitelist .config dirname
1 parent 404760e commit da831cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ impl ZellijPlugin for State {
153153
}
154154

155155
fn is_hidden(path: &Path) -> bool {
156+
const WHITELIST: [&str; 1] = [".config"];
157+
156158
path.file_name()
157159
.and_then(|s| s.to_str())
158-
.map(|s| s.starts_with('.'))
160+
.map(|s| s.starts_with('.') && !WHITELIST.contains(&s))
159161
.unwrap_or(false)
160162
}

0 commit comments

Comments
 (0)