From 79cbe89deb1151e703f4d91b19af9cdcc128b765 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Mon, 30 Sep 2024 07:38:05 -0400 Subject: [PATCH] doc: tweak wording for stdin detection This makes it slightly more precise to cover weird cases like trying to pass a directory on stdin. Closes #2906 --- crates/core/flags/doc/template.rg.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/core/flags/doc/template.rg.1 b/crates/core/flags/doc/template.rg.1 index dbbddd7d..75e075e3 100644 --- a/crates/core/flags/doc/template.rg.1 +++ b/crates/core/flags/doc/template.rg.1 @@ -43,10 +43,10 @@ configuration file. The file can specify one shell argument per line. Lines starting with \fB#\fP are ignored. For more details, see \fBCONFIGURATION FILES\fP below. .sp -ripgrep will automatically detect if stdin exists and search stdin for a regex -pattern, e.g. \fBls | rg foo\fP. In some environments, stdin may exist when -it shouldn't. To turn off stdin detection, one can explicitly specify the -directory to search, e.g. \fBrg foo ./\fP. +ripgrep will automatically detect if stdin is a readable file and search stdin +for a regex pattern, e.g. \fBls | rg foo\fP. In some environments, stdin may +exist when it shouldn't. To turn off stdin detection, one can explicitly +specify the directory to search, e.g. \fBrg foo ./\fP. .sp Like other tools such as \fBls\fP, ripgrep will alter its output depending on whether stdout is connected to a tty. By default, when printing a tty, ripgrep