Re: grep -R with no path

2019-12-03 Thread Klemens Nanni
On Tue, Dec 03, 2019 at 10:50:02AM +0100, Andreas Kusalananda Kähäri wrote: > Could I suggest using "the current working directory" or "the current > directory" in place of "the working directory"? That is what visa also suggested, so I committed it with "current", yes.

Re: grep -R with no path

2019-12-03 Thread Andreas Kusalananda Kähäri
On Tue, Dec 03, 2019 at 01:00:36AM +0100, Klemens Nanni wrote: > On Mon, Dec 02, 2019 at 08:31:02AM +, Miod Vallat wrote: > > grep(1), when invoked with the -R option but no path, displays a > > "recursive search of stdin" warning and acts as if -R had not been > > specified. > > > > GNU

Re: grep -R with no path

2019-12-03 Thread Jeremie Courreges-Anglas
On Tue, Dec 03 2019, Klemens Nanni wrote: > On Mon, Dec 02, 2019 at 08:31:02AM +, Miod Vallat wrote: >> grep(1), when invoked with the -R option but no path, displays a >> "recursive search of stdin" warning and acts as if -R had not been >> specified. >> >> GNU grep, in that case, will

Re: grep -R with no path

2019-12-02 Thread Klemens Nanni
On Mon, Dec 02, 2019 at 08:31:02AM +, Miod Vallat wrote: > grep(1), when invoked with the -R option but no path, displays a > "recursive search of stdin" warning and acts as if -R had not been > specified. > > GNU grep, in that case, will perform a recursive search in the current > directory,

Re: grep -R with no path

2019-12-02 Thread Todd C . Miller
On Mon, 02 Dec 2019 23:09:23 +0100, Jeremie Courreges-Anglas wrote: > This diff moves the fake argv logic moves into grep_tree() where we can > opt for pretty-printing. ok? That's similar to what I was going to propose. OK millert@ - todd

Re: grep -R with no path

2019-12-02 Thread Jeremie Courreges-Anglas
On Mon, Dec 02 2019, Jeremie Courreges-Anglas wrote: [...] > I have had a similar diff for some time but didn't push for it because > nitpicking: GNU grep doesn't prepend "./" to file names in this case. > I have a diff to do this but let's keep the nitpicking for later. Current: --8<--

Re: grep -R with no path

2019-12-02 Thread Todd C . Miller
On Mon, 02 Dec 2019 08:31:02 +, Miod Vallat wrote: > grep(1), when invoked with the -R option but no path, displays a > "recursive search of stdin" warning and acts as if -R had not been > specified. > > GNU grep, in that case, will perform a recursive search in the current > directory, i.e.

Re: grep -R with no path

2019-12-02 Thread Visa Hankala
On Mon, Dec 02, 2019 at 06:08:35PM +0100, Jeremie Courreges-Anglas wrote: > On Mon, Dec 02 2019, Marc Espie wrote: > > On Mon, Dec 02, 2019 at 08:31:02AM +, Miod Vallat wrote: > >> grep(1), when invoked with the -R option but no path, displays a > >> "recursive search of stdin" warning and

Re: grep -R with no path

2019-12-02 Thread Jeremie Courreges-Anglas
On Mon, Dec 02 2019, Marc Espie wrote: > On Mon, Dec 02, 2019 at 08:31:02AM +, Miod Vallat wrote: >> grep(1), when invoked with the -R option but no path, displays a >> "recursive search of stdin" warning and acts as if -R had not been >> specified. >> >> GNU grep, in that case, will perform

Re: grep -R with no path

2019-12-02 Thread Marc Espie
On Mon, Dec 02, 2019 at 08:31:02AM +, Miod Vallat wrote: > grep(1), when invoked with the -R option but no path, displays a > "recursive search of stdin" warning and acts as if -R had not been > specified. > > GNU grep, in that case, will perform a recursive search in the current > directory,

grep -R with no path

2019-12-02 Thread Miod Vallat
grep(1), when invoked with the -R option but no path, displays a "recursive search of stdin" warning and acts as if -R had not been specified. GNU grep, in that case, will perform a recursive search in the current directory, i.e. uses an implicit "." path if none is given. This is IMO a much