1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-30 22:23:44 +02:00

printer: --only-matching works with --replace

When -o/--only-matching is used with -r/--replace, the replacement works
as expected. This is not a breaking change because the flags were
previously set to conflict.
This commit is contained in:
Evgeny Kulikov
2017-09-01 20:13:44 +03:00
committed by Andrew Gallant
parent 363a4fa9b7
commit f887bc1f86
3 changed files with 21 additions and 2 deletions

View File

@ -162,7 +162,7 @@ pub fn app() -> App<'static, 'static> {
.arg(flag("no-ignore-parent"))
.arg(flag("no-ignore-vcs"))
.arg(flag("null").short("0"))
.arg(flag("only-matching").short("o").conflicts_with("replace"))
.arg(flag("only-matching").short("o"))
.arg(flag("path-separator").value_name("SEPARATOR").takes_value(true))
.arg(flag("pretty").short("p"))
.arg(flag("replace").short("r")