bug-grep
[Top][All Lists]
Advanced

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

bug#19261: Recursive grep even when content on stdin


From: Santiago
Subject: bug#19261: Recursive grep even when content on stdin
Date: Wed, 3 Dec 2014 19:41:14 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

El 03/12/14 a las 07:32, Jim Meyering escribió:
> On Wed, Dec 3, 2014 at 7:05 AM,  <address@hidden> wrote:
> > I'm forwarding a bug report filed in debian. Is this the expected
> > behavior?
> >
> > /tmp/greptest %  dpkg -l | grep -r grep
> > wtf:hello grep
> > /tmp/greptest %  dpkg -l | grep grep
> > ii  grep                                                        2.21-1
> > amd64        GNU grep, egrep and fgrep
> >
> > grep -r takes the current dir as input instead of stdin.
> 
> Hi Santiago,
> 
> That is the expected/documented behavior.
> It was changed upstream 2.5 years ago (as seen in the NEWS file):
> 
> * Noteworthy changes in release 2.11 (2012-03-02) [stable]
> 
> ** Bug fixes
> ...
> ** New features
> 
>   If no file operand is given, and a command-line -r or equivalent
>   option is given, grep now searches the working directory.  Formerly
>   grep ignored the -r and searched standard input nonrecursively.
>   An -r found in GREP_OPTIONS does not have this new effect.
> --------------------
> 
> Note that GREP_OPTIONS has recently been deprecated,
> so this functionality will disappear.

Jim, thanks for clarifying this.

Please, find attached a simple patch to document this in the man page
and info doc.

Regards,

Santiago

Attachment: grep-recursive-working-dir.patch
Description: Text Data


reply via email to

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