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: Jim Meyering
Subject: Re: manpage: Use -H instead of adding /dev/null to searched files
Date: Sat, 19 Jun 2021 15:23:30 -0700

On Wed, Jun 16, 2021 at 8:33 AM Mateusz Okulus <mmokulus@gmail.com> wrote:
> 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.

Thank you. I've committed that in your name and pushed.



reply via email to

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