Skip to content

Inconsistent behaviour for --invert-match #884

@kenorb

Description

@kenorb

What version of ripgrep are you using?

ripgrep 0.8.1

What operating system are you using ripgrep on?

macOS High Sierra

Bug

This command detects multiple -v params:

$ rg -ve foo -ve bar /dev/null
error: The argument '--invert-match' was provided more than once, but cannot be used multiple times

This doesn't:

$ rg -ve foo -v -e bar /dev/null

Also this one:

$ rg -v -e foo --invert-match --invert-match -e bar /dev/null

I'm not sure what should be the expected behaviour, but I think it's not consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug.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