Skip to content

Commit

Permalink
doc: mention that --stats is always implied by --json
Browse files Browse the repository at this point in the history
Fixes #2337
  • Loading branch information
BurntSushi committed Nov 25, 2023
1 parent 1cbcefd commit e14eeb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 4 additions & 1 deletion crates/core/flags/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
"
Expand Down

0 comments on commit e14eeb2

Please sign in to comment.