From e14eeb288fa4bce14fb0075a6a57da10c0446ffc Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Fri, 24 Nov 2023 14:10:02 -0500 Subject: doc: mention that --stats is always implied by --json Fixes #2337 --- crates/core/flags/defs.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/core/flags/defs.rs b/crates/core/flags/defs.rs index d4e3daf1..dbb85779 100644 --- a/crates/core/flags/defs.rs +++ b/crates/core/flags/defs.rs @@ -3392,7 +3392,8 @@ flags are used in concert with \flag{json}. .sp Other flags that control aspects of the standard output such as \flag{only-matching}, \flag{heading}, \flag{replace}, \flag{max-columns}, etc., -have no effect when \flag{json} is set. +have no effect when \flag{json} is set. However, enabling JSON output will +always implicitly and unconditionally enable \flag{stats}. .sp A more complete description of the JSON format used can be found here: \fIhttps://docs.rs/grep-printer/*/grep_printer/struct.JSON.html\fP. @@ -6420,6 +6421,8 @@ complete. .sp This set of aggregate statistics may expand over time. .sp +This flag is always and implicitly enabled when \flag{json} is used. +.sp Note that this flag has no effect if \flag{files}, \flag{files-with-matches} or \flag{files-without-match} is passed. " -- cgit v1.2.3