From 6904fdc63b2f41366a8148a38a34aeca1f5e6c06 Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Sat, 18 Dec 2021 20:24:36 -0500 Subject: [PATCH] quote path --- src/finder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finder.rs b/src/finder.rs index a9b2b2f..58af47d 100644 --- a/src/finder.rs +++ b/src/finder.rs @@ -24,7 +24,7 @@ impl SkimItem for DirItem { fn preview(&self, _context: PreviewContext) -> ItemPreview { if self.readme.is_none() { - return ItemPreview::Command(format!("ls {}", self.path)); + return ItemPreview::Command(format!("ls \"{}\"", self.path)); } let readme_path = self.readme.as_ref().unwrap();