Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
quote readme paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Dec 19, 2021
1 parent a67cd08 commit 7a062a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ impl SkimItem for DirItem {

let readme_path = self.readme.as_ref().unwrap();
if SETTINGS.preview_with_bat {
ItemPreview::Command(format!("bat --style=plain --color=always {}", readme_path))
ItemPreview::Command(format!(
"bat --style=plain --color=always \"{}\"",
readme_path
))
} else {
ItemPreview::Command(format!("cat {}", readme_path))
ItemPreview::Command(format!("cat \"{}\"", readme_path))
}
}
}
Expand Down

0 comments on commit 7a062a0

Please sign in to comment.