diff --git a/core/src/external/fd.rs b/core/src/external/fd.rs index d914b19bc..c1c606dbe 100644 --- a/core/src/external/fd.rs +++ b/core/src/external/fd.rs @@ -17,7 +17,7 @@ pub fn fd(opt: FdOpt) -> Result> { let mut child = Command::new("fd") .arg("--base-directory") .arg(&opt.cwd) - .arg(if opt.hidden { "--hidden" } else { "--no-hidden" }) + .args(if opt.hidden { ["--hidden", "--no-ignore"] } else { ["--no-hidden", "--ignore"] }) .arg(if opt.glob { "--glob" } else { "--regex" }) .arg(&opt.subject) .kill_on_drop(true) diff --git a/core/src/external/rg.rs b/core/src/external/rg.rs index c53ac06da..73114d508 100644 --- a/core/src/external/rg.rs +++ b/core/src/external/rg.rs @@ -16,7 +16,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"]) - .arg(if opt.hidden { "--hidden" } else { "--no-hidden" }) + .args(if opt.hidden { ["--hidden", "--no-ignore"] } else { ["--no-hidden", "--ignore"] }) .arg(&opt.subject) .kill_on_drop(true) .stdout(Stdio::piped())