From e5b10fbb07c9c8eb673de7a93ad4ba2601f206b1 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 13 Jan 2026 08:31:48 -0700 Subject: [PATCH] Only tab complete trailing slash if path is directory --- src/tab.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index 4ab47f8..3ea924b 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -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()