Skip to content

Display a warning when searching within an ignored directory #1404

@Manishearth

Description

@Manishearth

What version of ripgrep are you using?

$ rg --version
ripgrep 11.0.2
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

Cargo

What operating system are you using ripgrep on?

Ubuntu

Describe your question, feature request, or bug.

Sometimes you end up inside a directory that's actually gitignored, and search for stuff. Of course, no file will get searched, and you will be confused.

If ripgrep ends up not searching any files and it happens to be in a situation where there are files to search that it cannot because of the ignore file, it should probably display a warning saying "some files were skipped because of the ignore file, try --no-ignore-vcs to include".

I don't know if ripgrep ever shows warnings, but this would be a nice place to do so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement to the functionality of the software.gitignoreBugs related to gitignore problems.rollupA PR that has been merged with many others in a rollup.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions