From aa8c8ff8394d63e28529963e9e37c8f1c0607b4c Mon Sep 17 00:00:00 2001 From: LightQuantum Date: Sat, 23 Sep 2023 01:05:11 -0700 Subject: [PATCH] feat: include ignored files on search when hidden files are shown --- core/src/external/fd.rs | 2 +- core/src/external/rg.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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())