Only tab complete trailing slash if path is directory

This commit is contained in:
Jeremy Soller 2026-01-13 08:31:48 -07:00 committed by Ashley Wulber
parent e5d4a0a46e
commit e5b10fbb07

View file

@ -1469,8 +1469,10 @@ impl Location {
if let Ok(canonical) = fs::canonicalize(&path) {
path = canonical;
}
// Add trailing slash if location is a path
path.push("");
// Add trailing slash if location is a directory
if path.is_dir() {
path.push("");
}
self.with_path(path)
} else {
self.clone()