junegunn/fzf

Not searching recursively

himat opened this issue · 5 comments

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.48.1 (brew)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

I am definitely missing something because I am finding that fzf is not always searching recursively.

In my terminal, I'm at /opt/homebrew and run fzf and search for "squid" and I get these things back
image

But when I then manually cd into /opt/homebrew/etc/ and run fzf again and search for "squid", not I actually find the files I'm looking for

image

Why did fzf not search fully recursively from the directory that was one up?
Didn't work from /opt/homebrew
But worked from /opt/homebrew/etc
The file is located at /opt/homebrew/etc/squid.conf

Do you have $FZF_DEFAULT_COMMAND or $FZF_DEFAULT_OPTS defined?

himat commented

I have FZF_DEFAULT_COMMAND defined

╰─❯ echo $FZF_DEFAULT_COMMAND
rg --files --hidden

╰─❯ echo $FZF_DEFAULT_OPTS


Then try rg --files --hidden | grep squid in /opt/homebrew and see if you get the result.

himat commented

I see, that didn't work. So I guess it's a problem with rg then, thanks

himat commented

I did rg --files --no-ignore | grep squid and now it works
Turns out homebrew's /opt/homebrew/ dir is a cloned git dir and contains a .gitignore with only certain files/dirs unignored, so seems like that's why rg is ignoring certain dirs.