Петр Досычев wrote: > While writing wrapper for grep i foung 'K' in short options list (file > src/main.c line 279). > But it is not used.
Thanks for the report. Here's the fix: >From 2f2fa46615fead64fdf5aa78c7998cdadf6fb487 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Fri, 27 Apr 2012 11:42:23 +0200 Subject: [PATCH] grep: -K is not an option: remove it from list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The presence of "K" in the short-option string meant that an erroneous "grep -K ..." would fail with a bare Usage/Try... message, without the usual "invalid option -- 'K'". With this removal, now grep prints the expected invalid option diagnostic. * src/main.c (short_options): Remove "K". Reported by Петр Досычев in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4488 --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index c5a8489..cb6da2c 100644 --- a/src/main.c +++ b/src/main.c @@ -276,7 +276,7 @@ static struct exclude *included_patterns; static struct exclude *excluded_directory_patterns; /* Short options. */ static char const short_options[] = -"0123456789A:B:C:D:EFGHIPTUVX:abcd:e:f:hiKLlm:noqRrsuvwxyZz"; +"0123456789A:B:C:D:EFGHIPTUVX:abcd:e:f:hiLlm:noqRrsuvwxyZz"; /* Non-boolean long options that have no corresponding short equivalents. */ enum -- 1.7.10.336.gc5e31
