On Tue, Dec 03 2019, Klemens Nanni <[email protected]> wrote: > On Mon, Dec 02, 2019 at 08:31:02AM +0000, 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. uses an implicit "." path if none is given. >> >> This is IMO a much better behaviour. What about the following diff? > Document this. > > OK?
yep, ok jca@ > Index: grep.1 > =================================================================== > RCS file: /cvs/src/usr.bin/grep/grep.1,v > retrieving revision 1.49 > diff -u -p -r1.49 grep.1 > --- grep.1 7 Oct 2019 20:51:34 -0000 1.49 > +++ grep.1 2 Dec 2019 23:58:56 -0000 > @@ -246,6 +246,11 @@ will only search a file until a match ha > making searches potentially less expensive. > .It Fl R > Recursively search subdirectories listed. > +If no > +.Ar file > +is given, > +.Nm > +searches the working directory. > .It Fl s > Silent mode. > Nonexistent and unreadable files are ignored > -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
