Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not searching recursively #3752

Closed
4 of 10 tasks
himat opened this issue Apr 24, 2024 · 5 comments
Closed
4 of 10 tasks

Not searching recursively #3752

himat opened this issue Apr 24, 2024 · 5 comments
Labels

Comments

@himat
Copy link

himat commented Apr 24, 2024

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

@junegunn
Copy link
Owner

junegunn commented Apr 25, 2024

Do you have $FZF_DEFAULT_COMMAND or $FZF_DEFAULT_OPTS defined?

@himat
Copy link
Author

himat commented Apr 27, 2024

I have FZF_DEFAULT_COMMAND defined

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

╰─❯ echo $FZF_DEFAULT_OPTS


@junegunn
Copy link
Owner

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

@himat
Copy link
Author

himat commented Apr 28, 2024

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

@himat himat closed this as completed Apr 28, 2024
@himat
Copy link
Author

himat commented Apr 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants