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

--glob excluding a directory from the root #405

Closed
roblourens opened this issue Mar 12, 2017 · 0 comments
Closed

--glob excluding a directory from the root #405

roblourens opened this issue Mar 12, 2017 · 0 comments

Comments

@roblourens
Copy link
Contributor

Say I have two files in my workspace, ./foo/bar/file1.txt, and ./bar/foo/file2.txt. There seems to be an inconsistency in how the --glob option works:

  • rg -g 'foo/**' searches both, also expected
  • rg -g '/foo/**' searches file1.txt, which is expected
  • rg -g '!foo/**' searches neither, which is expected
  • rg -g '!/foo/**' searches neither, whereas I'd expect it to only exclude the file1 path.

The .gitignore works as I'd expect:

  • foo/ excludes both
  • /foo/ only excludes the file1 path

Am I using the CLI option wrong?

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

No branches or pull requests

1 participant