mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
ripgrep: add --no-multiline-dotall
This commit is contained in:
parent
9ca2d68e94
commit
7d93d2ab05
@ -152,6 +152,7 @@ _rg() {
|
|||||||
|
|
||||||
+ '(multiline-dotall)' # Multiline DOTALL options
|
+ '(multiline-dotall)' # Multiline DOTALL options
|
||||||
'(--no-multiline)--multiline-dotall[allow "." to match newline (with -U)]'
|
'(--no-multiline)--multiline-dotall[allow "." to match newline (with -U)]'
|
||||||
|
$no"(--no-multiline)--no-multiline-dotall[don't allow \".\" to match newline (with -U)]"
|
||||||
|
|
||||||
+ '(only)' # Only-match options
|
+ '(only)' # Only-match options
|
||||||
{-o,--only-matching}'[show only matching part of each line]'
|
{-o,--only-matching}'[show only matching part of each line]'
|
||||||
|
10
src/app.rs
10
src/app.rs
@ -1425,9 +1425,17 @@ file if you prefer \"dot all\" semantics by default. Note that regardless of
|
|||||||
whether this flag is used, \"dot all\" semantics can still be controlled via
|
whether this flag is used, \"dot all\" semantics can still be controlled via
|
||||||
inline flags in the regex pattern itself, e.g., '(?s:.)' always enables \"dot
|
inline flags in the regex pattern itself, e.g., '(?s:.)' always enables \"dot
|
||||||
all\" whereas '(?-s:.)' always disables \"dot all\".
|
all\" whereas '(?-s:.)' always disables \"dot all\".
|
||||||
|
|
||||||
|
This flag can be disabled with --no-multiline-dotall.
|
||||||
");
|
");
|
||||||
let arg = RGArg::switch("multiline-dotall")
|
let arg = RGArg::switch("multiline-dotall")
|
||||||
.help(SHORT).long_help(LONG);
|
.help(SHORT).long_help(LONG)
|
||||||
|
.overrides("no-multiline-dotall");
|
||||||
|
args.push(arg);
|
||||||
|
|
||||||
|
let arg = RGArg::switch("no-multiline-dotall")
|
||||||
|
.hidden()
|
||||||
|
.overrides("multiline-dotall");
|
||||||
args.push(arg);
|
args.push(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user