diff --git a/src/find/matchers/exec.rs b/src/find/matchers/exec.rs index 51337953..45c21734 100644 --- a/src/find/matchers/exec.rs +++ b/src/find/matchers/exec.rs @@ -53,7 +53,11 @@ impl SingleExecMatcher { impl Matcher for SingleExecMatcher { fn matches(&self, file_info: &WalkEntry, _: &mut MatcherIO) -> bool { - let mut command = Command::new(&self.executable); + let mut command = if &self.executable == "{}" { + command = Command::new(file_info.path()); + } else { + command = Command::new(&self.executable); + } let path_to_file = if self.exec_in_parent_dir { if let Some(f) = file_info.path().file_name() { Path::new(".").join(f)