feat: include ignored files on search when hidden files are shown (#212)

This commit is contained in:
LightQuantum 2023-09-23 21:19:17 -07:00 committed by GitHub
parent ec261a2708
commit e2ead7eecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ pub fn fd(opt: FdOpt) -> Result<UnboundedReceiver<File>> {
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)

View file

@ -16,7 +16,7 @@ pub fn rg(opt: RgOpt) -> Result<UnboundedReceiver<File>> {
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())