diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 2001-02-16 05:50:23 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 2001-02-16 05:50:23 +0000 |
commit | 75c653a6cb097d23e799711436bcac6505729298 (patch) | |
tree | d52220fd1f96c9634b6bf8c16fb56fa35d8b6706 /NEWS | |
parent | da71c4a53c626c6dd18bc0c43591cbe897e5608c (diff) | |
download | grep-75c653a6cb097d23e799711436bcac6505729298.tar.gz |
new options --include --exclude.
* djgpp/config.bat : Fix for 4dos.com.
* m4/dosfile.m4 (HAVE_DOS_FILE_CONTENTS) : Was not set.
Bugs noted and patched by Juan Manuel Guerrero.
A much requested feature, the possibility to select
files when doing recurse :
# find . -name "*.c" | xargs grep main {}
# grep --include=*.c main .
# find . -not -name "*.c" | xargs grep main {}
# grep --exclude=*.c main .
* src/grep.c (short_options): -R equivalent to -r.
(#ifdef) : Fix some inconsistencies in the use of #ifdefs, prefer
#if defined() wen possible.
(long_options) : Add --color, --include and exclude.
(Usage) : Description of new options.
(color) : Rename color variable to color_option.
Removed 'always|never|auto' arguments, not necessary for grep.
(exclude_pattern) : new variable, holder for the file pattern.
(include_pattern) : new variable, hoder for the file pattern.
* src/savedir.c : Signature change, take two new argmuments.
* doc/grep.texi : Document, new options.
* doc/grep.man : Document, new options.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ + - The new option --include=PATTERN will only search matching files + when recursing in directories and --exclude=PATTERN, will skip them. + + - The new option --color will use the environment variable GREP_COLOR + (default is red) to highlight the matching string. + - The following changes are for POSIX.2 conformance: . The -q or --quiet or --silent option now causes grep to exit @@ -21,8 +27,8 @@ - The new -P or --perl-regexp option tells grep to interpert the pattern as a Perl regular expression. - - The new option --max-count=num makes grep stop reading - a file after num matching lines. + - The new option --max-count=num makes grep stop reading a file after num + matching lines. New option -m; equivalent to --max-count. Version 2.4.2 |