summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2023-11-24 14:10:02 -0500
committerAndrew Gallant <jamslam@gmail.com>2023-11-25 15:03:53 -0500
commite14eeb288fa4bce14fb0075a6a57da10c0446ffc (patch)
tree1c749394bef7e7c82f20fc72d5f6a0a718b8ca52
parent1cbcefddc9cfe1a9acbcc71adef7d9c0591fcb1d (diff)
doc: mention that --stats is always implied by --json
Fixes #2337
-rw-r--r--CHANGELOG.md2
-rw-r--r--crates/core/flags/defs.rs5
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 539a06e9..f557fe85 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -75,6 +75,8 @@ Bug fixes:
Fix gitignore parsing bug where a trailing `\/` resulted in an error.
* [BUG #2243](https://github.com/BurntSushi/ripgrep/issues/2243):
Fix `--sort` flag for values other than `path`.
+* [BUG #2337](https://github.com/BurntSushi/ripgrep/issues/2337):
+ Improve docs to mention that `--stats` is always implied by `--json`.
* [BUG #2381](https://github.com/BurntSushi/ripgrep/issues/2381):
Make `-p/--pretty` override flags like `--no-line-number`.
* [BUG #2392](https://github.com/BurntSushi/ripgrep/issues/2392):
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.
"