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

Inverse of .ignore file (like .include) or explicit include support in .ignore file #1542

Open
etosan opened this issue Oct 9, 2024 · 1 comment

Comments

@etosan
Copy link

etosan commented Oct 9, 2024

ag and some other tools support .ignore file, where one can exclude searching in specific files and directories that are of no interest.

Unfortunately in some projects, like for example gitea managed ones, there are hidden dirs like .gitea that one would like ag to search through anyway, by default, especially when dealing with IaC monorepos and similar (as action workflows live there etc).

It would be great, if one could have explicit inclusions for such dirs defined in .ignore-file for exemaple by following .gitignore's !something pattern to explicitly include given path.

Would this be possible?

@thomasjm
Copy link

I was expecting this to work with "!" syntax and was surprised to find that it doesn't.

Seems like ripgrep supports it out of the box.

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

2 participants