From 441410c1f0cff928e5e514c5225313a22bdac082 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Thu, 16 May 2024 19:00:36 +0800 Subject: [PATCH] Use `arg` --- yazi-plugin/src/external/fd.rs | 2 +- yazi-plugin/src/external/rg.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yazi-plugin/src/external/fd.rs b/yazi-plugin/src/external/fd.rs index 8ba6c3ec..74aaca15 100644 --- a/yazi-plugin/src/external/fd.rs +++ b/yazi-plugin/src/external/fd.rs @@ -16,7 +16,7 @@ pub fn fd(opt: FdOpt) -> Result> { .arg("--base-directory") .arg(&opt.cwd) .arg("--regex") - .args(if opt.hidden { ["--hidden"] } else { ["--no-hidden"] }) + .arg(if opt.hidden { "--hidden" } else { "--no-hidden" }) .args(opt.args) .arg(opt.subject) .kill_on_drop(true) diff --git a/yazi-plugin/src/external/rg.rs b/yazi-plugin/src/external/rg.rs index 2763fd4b..7ff71f2c 100644 --- a/yazi-plugin/src/external/rg.rs +++ b/yazi-plugin/src/external/rg.rs @@ -15,7 +15,7 @@ pub fn rg(opt: RgOpt) -> Result> { let mut child = Command::new("rg") .current_dir(&opt.cwd) .args(["--color=never", "--files-with-matches", "--smart-case"]) - .args(if opt.hidden { ["--hidden"] } else { ["--no-hidden"] }) + .arg(if opt.hidden { "--hidden" } else { "--no-hidden" }) .args(opt.args) .arg(opt.subject) .kill_on_drop(true)