ripgrep 0.8.1
macOS High Sierra
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.
This looks like a clap bug. The expected behavior is for multiple -v flags to be allowed, but it looks like you found a case where clap doesn't permit it, even though AppSettings::AllArgsOverrideSelf is set.
cc @kbknapp (super low priority bug)
Thanks for the ping! I'll look into it soon, it appears that it'll be a super easy fix.
@kbknapp Should I create an issue on clap's repo for this or does one already exist?
Most helpful comment
Thanks for the ping! I'll look into it soon, it appears that it'll be a super easy fix.