summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* doc: clarify that PCRE support is here to stayJim Meyering2018-02-171-2/+2
| | | | | * doc/grep.texi (grep Programs): Clarify: it's not PCRE support that is experimental, but its combination with --null-data (-z).
* maint: update gnulib and copyright dates for 2018Jim Meyering2018-01-062-2/+2
| | | | | | * gnulib: Update to latest. * all files: Run "make update-copyright". * bootstrap: Update from gnulib.
* doc: document the option delimiter '--'Bernhard Voelker2017-10-131-0/+8
| | | | | | * doc/grep.texi (Other options): Do the above. Reported in https://lists.opensuse.org/opensuse/2017-03/msg00411.html This addresses http://bugs.gnu.org/26139
* grep: -L exits with status 0 if a file is selectedPaul Eggert2017-08-171-0/+3
| | | | | | | Problem reported by Anthony Sottile (Bug#28105). * NEWS, doc/grep.texi (Exit Status), src/grep.c (usage): Document this. * src/grep.c (grepdesc): Implement it. * tests/skip-read: Test it.
* doc: distinguish -w from \<...\>Paul Eggert2017-07-251-1/+9
| | | | | * doc/grep.texi (Matching Control): Give example of why -w differs from \<...\> (Bug#27813).
* doc: define Dt string in man pagePaul Eggert2017-07-111-0/+15
| | | | | | Problem reported by Bjarni I. Gislason via Santiago R.R. (Bug#27651). * doc/grep.in.1 (dT): New macro. (Dt): Define this string.
* doc: fix another typoJim Meyering2017-06-251-1/+1
| | | | * doc/grep.texi (File and Directory Selection): Fix typo: s/afer/after/
* doc: stop calling --perl-regexp (-P) "highly" experimentalJim Meyering2017-06-242-2/+2
| | | | | | | | Use wording that is less likely to make readers think that support for -P may be removed. * doc/grep.in.1: s/highly experimental/experimental/ * doc/grep.texi: Likewise. Suggested by Evan Sheahan.
* doc: correct typoJim Meyering2017-06-211-1/+1
| | | | * doc/grep.texi (Performance): s/suprisingly/surprisingly/
* grep: -m no longer cuts off trailing contextPaul Eggert2017-06-211-6/+4
| | | | | | | | | Problem reported by Markus Jochim (Bug#26254). * NEWS, doc/grep.texi (General Output Control): Document this. * src/grep.c (prpending): Selected lines no longer cut off context. (usage): Say "selected" instead of "matching", where appropriate. * tests/foad1, tests/max-count-vs-context, tests/yesno: Adjust to match new behavior.
* Document grep performancePaul Eggert2017-05-311-0/+88
| | | | * doc/grep.texi (Performance): New section.
* Fix up recent -U patchesPaul Eggert2017-02-161-13/+14
| | | | | | | | | | | | | | | Inspired by a suggestion by Eric Blake (Bug#25707#17). * bootstrap.conf (gnulib_modules): Add xbinary-io, and remove binary-io and xfreopen. * doc/grep.texi (Other Options): Fix typo and reword to be a bit more general. * src/grep.c: Include xbinary-io.h instead of xfreopen.h. (grepfile): Open with O_BINARY if binary. (grepdesc): No need for set_binary_mode now. (grep_command_line_arg, main): Set stdin to binary mode if binary. (main): Avoid unnecessary test of stdin == NULL. Use xsetmode instead of xfreopen. * src/system.h: Do not include binary-io.h.
* Simplify -U on MS-Windows by removing guessworkPaul Eggert2017-02-161-34/+20
| | | | | | | | | | | | | | Suggested by Eric Blake (Bug#25707#11). * NEWS, doc/grep.texi: Document this. * src/dosbuf.c: Remove. * bootstrap.conf (gnulib_modules): Add xfreopen. * src/grep.c: Include xfreopen.h, not dosbuf.c. (fillbuf, print_line_head): Do not undossify input. (binary): New static var. (grepdesc): Apply BINARY to input file. (usage): Remove -u help. (main): Set BINARY if -U, and apply it to stdout. Do nothing if -u. With -f, apply BINARY to input file.
* Update TODO and docPaul Eggert2017-02-132-24/+29
| | | | | | | * TODO: Bring up-to-date and fix formatting glitches. * doc/grep.in.1, doc/grep.texi: Fix minor glitches. The above patches should address the same problems that recent Debian doc patches address, albeit in a different way.
* doc: clarify default input (Bug#25651)Paul Eggert2017-02-121-8/+12
| | | | | | | * doc/grep.in.1: * src/grep.c (usage): Clarify default input when -r. * src/grep.c (usage): Do not bother documenting egrep and fgrep; the manual is enough.
* maint: update gnulib and copyright dates for 2017Jim Meyering2017-01-013-3/+3
| | | | | * gnulib: Update to latest. * all files: Run "make update-copyright".
* doc: fix a doubled "the"Jim Meyering2016-11-191-1/+1
| | | | * doc/grep.texi (--perl-regexp): s/the\nthe/the/
* grep: -T now adjusts number widths for worst casePaul Eggert2016-11-191-4/+2
| | | | | | | | | * NEWS, doc/grep.texi (Output Line Prefix Control): Document this (Bug#24451). * src/grep.c (offset_width): New static var. (print_offset): Use it instead of arg. All callers changed. (grep): Set it. * tests/initial-tab: Test this.
* grep: document -oz betterPaul Eggert2016-11-191-1/+4
| | | | * doc/grep.texi (General Output Control, Usage): Tweak (Bug#24961).
* grep: -Pz no longer rejects ^, $Paul Eggert2016-11-191-1/+3
| | | | | | | | | | | | | Problem reported by Stephane Chazelas (Bug#22655). * NEWS: Document this. * doc/grep.texi (grep Programs): Warn about -Pz. * src/pcresearch.c (reflags): New static var. (multibyte_locale): Remove static var; now local to Pcompile. (Pcompile): Check for (? and (* too. Set reflags instead of dying when problematic operators are found. (Pexecute): Use reflags to decide whether searches should be multiline. * tests/pcre: Test new behavior.
* grep: encoding errors suppress just their linePaul Eggert2016-09-081-6/+7
| | | | | | | | From a suggestion by Marcello Perathoner (Bug#22838). * NEWS, doc/grep.texi (File and Directory Selection): Document this. * src/grep.c (print_line_head): Do not suppress later output lines merely because an earlier output line would have had an encoding error. * tests/encoding-error: Test for the new behavior.
* doc: define "context lines"Paul Eggert2016-09-071-2/+6
| | | | | Reported by Igor Bogomazov via Santiago Ruano Rincón (Bug#24024). * doc/grep.texi (Context Line Control): Define "context lines".
* doc: propagate more changes from grep.texiPaul Eggert2016-06-141-27/+93
| | | | | Problem reported by Björn Voigt in: http://bugs.gnu.org/23763#27 * doc/grep.in.1: Fix more inconsistencies with grep.texi.
* doc: remove obsolete MS-DOS mentionPaul Eggert2016-06-131-2/+3
| | | | | * doc/grep.in.1: Remove obsolete discussion of MS-DOS heuristics. Problem reported by Björn Voigt in: http://bugs.gnu.org/23763
* grep: minor doc tweaks inspired by DebianPaul Eggert2016-04-102-15/+21
| | | | | | | | Problem reported by Santiago Ruano Rincón in: http://bugs.gnu.org/22911 * doc/grep.in.1: * doc/grep.texi (Matching Control, grep Programs) (Regular Expressions): Document -e, -f, and PCRE more carefully.
* grep: in C locale, all bytes are valid charactersPaul Eggert2016-04-101-5/+14
| | | | | | | | | | | | | | | This works around glibc bug 19932: https://sourceware.org/bugzilla/show_bug.cgi?id=19932 The actual bug fix was the update to the current version of Gnulib. grep problem reported by Björn Jacke in: http://bugs.gnu.org/23234 * NEWS: Mention this. * doc/grep.texi (File and Directory Selection): Crossref to LC_* section. Suggest why -a or LC_ALL=C might be useful. (Environment Variables): Mention 'locale -a'. Say that LC_CTYPE also specifies encoding, and that every byte is a valid character in the C or POSIX locale. * tests/c-locale: New test. * tests/Makefile.am (TESTS): Add it.
* Give another example of binary file processingPaul Eggert2016-04-051-4/+10
| | | | | | | Problem reported by Shlomi Fish * doc/grep.texi (File and Directory Selection): Document that 'q$' might match 'q' followed by a NUL if --binary-files=binary is in effect.
* grep: -oz now outputs null bytes, not newlinesPaul Eggert2016-03-181-2/+2
| | | | | | | | | * NEWS: Document this. * doc/grep.texi (Other Options): Clarify that -z affects output as well as input data. * src/grep.c (print_line_middle): Output eolbyte, not newline, if -o. * tests/null-byte: Test -o too. * tests/pcre-context: Adjust test to match new behavior.
* grep: -x now supersedes -w more consistentlyPaul Eggert2016-01-151-0/+1
| | | | | | | | | | | | * NEWS, doc/grep.texi (Matching Control): Mention this. * src/dfasearch.c (EGexecute): * src/pcresearch.c (Pcompile): Don't get confused by -w if -x is also present. * src/pcresearch.c (Pcompile): Remove misleading comment about non-UTF-8 multibyte locales, as PCRE doesn't support them. Calculate buffer sizes more carefully; the old method allocated a buffer slightly too big, seemingly due to luck. * tests/backref-word, tests/pcre: Add tests for this bug.
* maint: update copyright year, bootstrap, init.shJim Meyering2016-01-013-3/+3
| | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest. * tests/init.sh: Update from gnulib. * bootstrap: Likewise.
* doc: clarify text vs binary match outputPaul Eggert2015-12-311-5/+4
| | | | | | | | * NEWS: * doc/grep.texi (File and Directory Selection): Make it clearer that grep can now output matching text before reporting a binary match. Problem reported by Norihiro Tanaka in: http://bugs.gnu.org/20526#83
* doc: minor clarificationsPaul Eggert2015-12-312-8/+17
| | | | | | * doc/grep.in.1, doc/grep.texi: Minor clarifications suggested by Debian documentation patches. Problem reported by Santiago Ruano Rincón in: http://bugs.gnu.org/18651
* grep: be less picky about encoding errorsPaul Eggert2015-12-301-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a longstanding problem introduced in grep 2.21, which is overly picky about binary files. * NEWS: * doc/grep.texi (File and Directory Selection): Document this. * src/grep.c (input_textbin, textbin_is_binary, buffer_textbin) (file_textbin): Remove. All uses removed. (encoding_error_output): New static var. (buf_has_encoding_errors, buf_has_nulls, file_must_have_nulls): New functions, which reuse bits and pieces of the removed functions. (lastout, print_line_head, print_line_middle, print_line_tail, prline) (prpending, prtext, grepbuf): Avoid use of const, now that we have functions that require modifying a sentinel. (print_line_head): New arg LEN. All uses changed. (print_line_head, print_line_tail): Return indicator whether the output line was printed. All uses changed. (print_line_middle): Exit early on encoding error. (grep): Use new method for determining whether file is binary. * src/grep.h (enum textbin, TEXTBIN_BINARY, TEXTBIN_UNKNOWN) (TEXTBIN_TEXT, input_textbin): Remove decls. All uses removed. * src/pcresearch.c (Pexecute): Remove multiline optimization, since the main program no longer checks for encoding errors on input. * tests/encoding-error: New file. * tests/Makefile.am (TESTS): Add it.
* grep: --exclude matches trailing parts of argsPaul Eggert2015-12-281-5/+8
| | | | | | | | | | | | Problem reported by Vincent Lefevre in: http://bugs.gnu.org/22144 * NEWS: * doc/grep.texi (File and Directory Selection): Document this. * src/grep.c (excluded_patterns, excluded_directory_patterns): Now 2-element arrays, with one element for subfiles and another for command-line args. All uses changed. This implements the change. (exclude_options): New function. * tests/include-exclude: Test the change.
* maint: ignore gendocs_template_minPaul Eggert2015-07-041-0/+1
| | | | * doc/.gitignore: Add '/gendocs_template_min'.
* doc: give a script wrapper examplePaul Eggert2015-03-111-0/+9
| | | | | | * doc/grep.texi (Environment Variables): Give an example of a wrapper script, as an alternative to using GREP_OPTIONS. Fixes: bug#19998
* doc: clarify how -a matchesPaul Eggert2015-03-112-2/+10
| | | | | | | * doc/grep.in.1, doc/grep.texi (File and Directory Selection): Give an example of how non-text bytes affect pattern matching in binary files. Fixes: bug#20080
* maint: update copyright year ranges to include 2015Jim Meyering2015-01-013-3/+3
| | | | | Run "make update-copyright". Also, ... * grep.texi: Update manually, converting each "--" to "-".
* doc: document binary-data heuristic betterPaul Eggert2014-12-151-2/+7
| | | | | | | Problem reported by Martin Hoch in: http://bugs.gnu.org/19388 * doc/grep.texi (File and Directory Selection): Document what non-text bytes are. (Usage): Fix cross reference.
* doc: document grep-2.11 change in behavior of -r, --recursiveSantiago Ruano Rincón2014-12-042-0/+2
| | | | | | | * doc/grep.texi (--recursive, -r): Mention the new behavior of recursively searching "." when there is no FILE argument. * doc/grep.in.1: Likewise. That change first appeared in grep-2.11, released on 2012-03-02.
* build: generate man pages even when existing targets are read-onlyJim Meyering2014-10-311-4/+8
| | | | | | | | | * doc/Makefile.am (grep.1): Use mv -f to move temporary to target, in case the target is read-only. Also, always make the generated files read-only. (egrep.1 fgrep.1): Likewise. This avoids a build failure reported by Eric Blake in http://lists.gnu.org/archive/html/bug-grep/2014-10/msg00112.html
* doc: modernize and simplify man pagePaul Eggert2014-10-071-133/+35
| | | | | | | | * doc/grep.in.1 (Tx, Id): Remove. All uses removed. (MTO, URL): New macros, used for email and URL. Use them when appropriate. In main text, omit chatty discussions of other implementations; the full manual suffices for this sort of thing.
* doc: clarify exit statusPaul Eggert2014-10-072-23/+10
| | | | | | Reported by Santiago Ruano Rincón in: http://bugs.gnu.org/18651 * doc/grep.in.1 (EXIT STATUS): * doc/grep.texi (Exit Status): Clarify.
* grep: non-text bytes in binary data may be treated as line endsPaul Eggert2014-09-171-0/+2
| | | | | | | | * NEWS, doc/grep.texi (File and Directory Selection): Document this change. * src/grep.c (zap_nuls): New function. (grep): Use it. * tests/null-byte: Relax to allow new behavior.
* grep: treat a file as binary if its prefix contains encoding errorsPaul Eggert2014-09-161-1/+2
| | | | | | | | | | | | | | | | | * NEWS: * doc/grep.texi (File and Directory Selection): Document this. * src/grep.c (buffer_encoding, buffer_textbin): New functions. (file_textbin): Rename from file_is_binary. Now returns 3-way value. All callers changed. (file_textbin, grep): Check the input more carefully for text vs binary data. (contains_encoding_error): Remove; use replaced by buffer_encoding. * tests/backref-multibyte-slow: * tests/high-bit-range: * tests/invalid-multibyte-infloop: Use -a, since the input is now considered to be binary. * tests/invalid-multibyte-infloop: Add a check for new behavior.
* grep: make GREP_OPTIONS obsolescentPaul Eggert2014-09-122-28/+9
| | | | | | | | | * NEWS: * doc/grep.in.1 (ENVIRONMENT_VARIABLES): * doc/grep.texi (Environment Variables): Document that GREP_OPTIONS is obsolescent now. * src/grep.c (main): Warn if GREP_OPTIONS is used. * tests/r-dot, tests/skip-device: Don't use GREP_OPTIONS.
* doc: bug tracker has moved to debbugs.gnu.orgPaul Eggert2014-09-112-7/+7
| | | | | | * README (KNOWN BUGS): * doc/grep.in.1: * doc/grep.texi (Reporting Bugs): Document this.
* doc: document LANGUAGEPaul Eggert2014-08-031-3/+13
| | | | | Reported by Benno Schulenberg in: http://bugs.gnu.org/18185 * doc/grep.texi (Environment Variables): Document LANGUAGE.
* doc: prefer @env to @codePaul Eggert2014-08-031-16/+16
| | | | | Reported by Benno Schulenberg in: http://bugs.gnu.org/18184 * doc/grep.texi: Avoid @code in favor of @env, or of nothing at all.
* doc: Document -r vs --exclude more carefully.Paul Eggert2014-07-111-9/+11
| | | | | | | Problem reported by Hugues Andreux in: http://bugs.gnu.org/17763 * doc/grep.texi (File and Directory Selection): Be more careful about documenting the interaction between recursive searching, --include, --exclude, and --exclude-dir.