Skip to content

No matches with empty patterns file and invert match #1332

Open
@wrodis

Description

@wrodis

What version of ripgrep are you using?

ripgrep 11.0.1
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

Compiled from repo.

What operating system are you using ripgrep on?

CentOS 7.

Describe your question, feature request, or bug.

ripgrep's behaviour seems inconsistent with grep's when using an empty file with --file and inverting match with -v.

$ echo text > /tmp/file; touch /tmp/empty_patterns; grep --file /tmp/empty_patterns -v /tmp/file; echo $?; rg --debug --file /tmp/empty_patterns -v /tmp/file; echo $?
text
0
1

Not 100% sure if it's a bug or a feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug.questionAn issue that is lacking clarity on one or more points.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions