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

cli: don't let context flags override eachother #2451

Closed
wants to merge 1 commit into from

Conversation

r2p2
Copy link

@r2p2 r2p2 commented Mar 13, 2023

Match the behavior of GNU grep which does not ignore before-context and after-context completely if the context flag is also provided.

Fixes #2288

Match the behavior of GNU grep which does not ignore before-context and
after-context completely if the context flag is also provided.

Fixes BurntSushi#2288
@BurntSushi BurntSushi added the rollup A PR that has been merged with many others in a rollup. label Jul 7, 2023
BurntSushi added a commit that referenced this pull request Jul 8, 2023
This matches the behavior of GNU grep which does not ignore
before-context and after-context completely if the context flag is also
provided.

Note that this change wasn't done just to match GNU grep. In this case,
GNU grep has the more sensible behavior.

Fixes #2288, Closes #2451
@BurntSushi BurntSushi closed this in d675844 Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR that has been merged with many others in a rollup.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-A/-B completely overrides -C
2 participants