Skip to content
Myr

doc: tweak wording for stdin detection

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This makes it slightly more precise to cover weird cases like trying to pass a directory on stdin. Closes #2906

authored by Andrew Gallant · committed by Andrew Gallant · parent bf63fe8 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:crates/core/flags/doc/template.rg.1+4 added-4 removed
41 unmodified lines
42configuration file. The file can specify one shell argument per line. Lines43starting with \fB#\fP are ignored. For more details, see \fBCONFIGURATION44FILES\fP below.45.sp46ripgrep will automatically detect if stdin exists and search stdin for a regex47pattern, e.g. \fBls | rg foo\fP. In some environments, stdin may exist when48it shouldn't. To turn off stdin detection, one can explicitly specify the49directory to search, e.g. \fBrg foo ./\fP.46ripgrep will automatically detect if stdin is a readable file and search stdin47for a regex pattern, e.g. \fBls | rg foo\fP. In some environments, stdin may48exist when it shouldn't. To turn off stdin detection, one can explicitly49specify the directory to search, e.g. \fBrg foo ./\fP.50.sp51Like other tools such as \fBls\fP, ripgrep will alter its output depending on52whether stdout is connected to a tty. By default, when printing a tty, ripgrep53will enable colors, line numbers and a heading format that lists each matching
371 unmodified lines