>From 53389bc57cc30ae1454ff48245cf63a703f02024 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 3 Oct 2019 15:23:33 -0700 Subject: [PATCH] grep: tighten -i doc * doc/grep.in.1: * doc/grep.texi (Matching Control): * src/grep.c (usage): Make it clearer that -i affects patterns and data, but not file names (Bug#37604). --- doc/grep.in.1 | 3 ++- doc/grep.texi | 3 ++- src/grep.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/grep.in.1 b/doc/grep.in.1 index 4a3e274..a2cbf5c 100644 --- a/doc/grep.in.1 +++ b/doc/grep.in.1 @@ -250,7 +250,8 @@ option, search for all patterns given. The empty file contains zero patterns, and therefore matches nothing. .TP .BR \-i ", " \-\^\-ignore\-case -Ignore case distinctions, so that characters that differ only in case +Ignore case distinctions in patterns and input data, +so that characters that differ only in case match each other. .TP .BR \-v ", " \-\^\-invert\-match diff --git a/doc/grep.texi b/doc/grep.texi index e6e0dbe..f5edc72 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -198,7 +198,8 @@ The empty file contains zero patterns, and therefore matches nothing. @opindex -y @opindex --ignore-case @cindex case insensitive search -Ignore case distinctions, so that characters that differ only in case +Ignore case distinctions in patterns and input data, +so that characters that differ only in case match each other. Although this is straightforward when letters differ in case only via lowercase-uppercase pairs, the behavior is unspecified in other situations. For example, uppercase ``S'' has an diff --git a/src/grep.c b/src/grep.c index ef6abb8..4b6b465 100644 --- a/src/grep.c +++ b/src/grep.c @@ -1926,7 +1926,7 @@ Pattern selection and interpretation:\n"), getprogname ()); printf (_("\ -e, --regexp=PATTERNS use PATTERNS for matching\n\ -f, --file=FILE take PATTERNS from FILE\n\ - -i, --ignore-case ignore case distinctions\n\ + -i, --ignore-case ignore case distinctions in patterns and data\n\ -w, --word-regexp match only whole words\n\ -x, --line-regexp match only whole lines\n\ -z, --null-data a data line ends in 0 byte, not newline\n")); -- 2.21.0