Index: ChangeLog =================================================================== RCS file: /cvsroot/grep/grep/ChangeLog,v retrieving revision 1.207 diff -u -r1.207 ChangeLog --- ChangeLog 23 Nov 2004 12:49:36 -0000 1.207 +++ ChangeLog 1 Dec 2004 09:10:16 -0000 @@ -1,3 +1,12 @@ +2004-12-01 Stepan Kasal + + * src/grep.c (usage): Use ``FILE_PATTERN'' for --include and --exclude. + * doc/grep.1: Likewise; state that wildcard matching is used. + +2004-11-28 Benno Schulenberg (tiny change) + + * src/grep.c (usage): Clean up several details in the usage string. + 2004-11-23 Stepan Kasal * src/Makefile.am: The egrep and fgrep script now use their own Index: doc/grep.1 =================================================================== RCS file: /cvsroot/grep/grep/doc/grep.1,v retrieving revision 1.25 diff -u -r1.25 grep.1 --- doc/grep.1 19 Nov 2004 13:51:29 -0000 1.25 +++ doc/grep.1 1 Dec 2004 09:10:16 -0000 @@ -321,13 +321,14 @@ .B "\-d recurse" option. .TP -.BR "\fR \fP \-\^\-include=" PATTERN -Recurse in directories only searching file matching -.I PATTERN. -.TP -.BR "\fR \fP \-\^\-exclude=" PATTERN -Recurse in directories skip file matching -.I PATTERN. +.BR "\fR \fP \-\^\-include=" FILE_PATTERN +Recurse in directories, searching only files matching +.I FILE_PATTERN. +(Wildcard matching is used.) +.TP +.BR "\fR \fP \-\^\-exclude=" FILE_PATTERN +Recurse in directories, skiping all files and directories matching +.I FILE_PATTERN. .TP .BR \-s ", " \-\^\-no-messages Suppress error messages about nonexistent or unreadable files. Index: src/grep.c =================================================================== RCS file: /cvsroot/grep/grep/src/grep.c,v retrieving revision 1.86 diff -u -r1.86 grep.c --- src/grep.c 23 Nov 2004 10:00:48 -0000 1.86 +++ src/grep.c 1 Dec 2004 09:10:16 -0000 @@ -1123,20 +1123,20 @@ --label=LABEL print LABEL as filename for standard input\n\ -o, --only-matching show only the part of a line matching PATTERN\n\ -q, --quiet, --silent suppress all normal output\n\ - --binary-files=TYPE assume that binary files are TYPE\n\ + --binary-files=TYPE assume that binary files are TYPE;\n\ TYPE is 'binary', 'text', or 'without-match'\n\ -a, --text equivalent to --binary-files=text\n\ -I equivalent to --binary-files=without-match\n\ - -d, --directories=ACTION how to handle directories\n\ + -d, --directories=ACTION how to handle directories;\n\ ACTION is 'read', 'recurse', or 'skip'\n\ - -D, --devices=ACTION how to handle devices, FIFOs and sockets\n\ + -D, --devices=ACTION how to handle devices, FIFOs and sockets;\n\ ACTION is 'read' or 'skip'\n\ -R, -r, --recursive equivalent to --directories=recurse\n\ - --include=PATTERN files that match PATTERN will be examined\n\ - --exclude=PATTERN files that match PATTERN will be skipped.\n\ - --exclude-from=FILE files that match PATTERN in FILE will be skipped.\n\ - -L, --files-without-match only print FILE names containing no match\n\ - -l, --files-with-matches only print FILE names containing matches\n\ + --include=FILE_PATTERN files that match FILE_PATTERN will be examined\n\ + --exclude=FILE_PATTERN files that match FILE_PATTERN will be skipped\n\ + --exclude-from=FILE files matching any pattern from FILE are skipped\n\ + -L, --files-without-match only print names of FILEs containing no match\n\ + -l, --files-with-matches only print names of FILEs containing matches\n\ -c, --count only print a count of matching lines per FILE\n\ -Z, --null print 0 byte after FILE name\n")); printf (_("\ @@ -1147,15 +1147,15 @@ -C, --context=NUM print NUM lines of output context\n\ -NUM same as --context=NUM\n\ --color[=WHEN],\n\ - --colour[=WHEN] use markers to distinguish the matching string\n\ - WHEN may be `always', `never' or `auto'.\n\ + --colour[=WHEN] use markers to distinguish the matching string;\n\ + WHEN is `always', `never', or `auto'\n\ -U, --binary do not strip CR characters at EOL (MSDOS)\n\ -u, --unix-byte-offsets report offsets as if CRs were not there (MSDOS)\n\ \n\ `egrep' means `grep -E'. `fgrep' means `grep -F'.\n\ -With no FILE, or when FILE is -, read standard input. If less than\n\ -two FILEs given, assume -h. Exit status is 0 if match, 1 if no match,\n\ -and 2 if trouble.\n")); +With no FILE, or when FILE is -, standard input is read. If less than two\n\ +FILEs are given, -h is assumed. Exit status is 0 if any line was selected,\n\ +1 otherwise; if any error occures and -q was not given, the exit status is 2.\n")); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status);