grep-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: manpage: Use -H instead of adding /dev/null to searched files


From: Mateusz Okulus
Subject: Re: manpage: Use -H instead of adding /dev/null to searched files
Date: Wed, 16 Jun 2021 17:31:22 +0200

On 21/06/13 04:19PM, Paul Eggert wrote:
> Yes it was, but -H is not portable but the /dev/null trick is, and there is
> an advantage for the manual to prefer the the more-portable technique.
>
> The grep manual does mention both ways and says that /dev/null is more
> portable. Not sure what other specific thing it should say. If you can think
> of something, a patch (in 'git format-patch' style) would be helpful.

I didn't realize that -H option is a GNU extension. It's mentioned in
full manual, but I only checked the man page. In contrast {,m} match
repetition option is marked as such both in manpage and manual.

Because of that I think it would be beneficial to also include this in
manpage.


---
 doc/grep.in.1 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/grep.in.1 b/doc/grep.in.1
index c0b6b40..341d678 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -392,6 +392,7 @@ print the offset of the matching part itself.
 .BR \-H ", " \-\^\-with\-filename
 Print the file name for each match.
 This is the default when there is more than one file to search.
+This is a GNU extension.
 .TP
 .BR \-h ", " \-\^\-no\-filename
 Suppress the prefixing of file names on output.
--
2.32.0

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]