Re: grep -R without directory argument

2015-04-30 Thread Vadim Zhukov
2015-04-30 8:51 GMT+03:00 Martin Natano nat...@natano.net: grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a fallback when no directories are specified would make sense.

Re: grep -R without directory argument

2015-04-30 Thread Alexander Hall
On April 30, 2015 9:19:18 AM GMT+02:00, Alexander Hall alexan...@beard.se wrote: While the situation you describe is admittedly horribly annoying (BTDT), we do allow 'grep -I 123', which would also seem pointless. Bah. That's lowercase -i, obviously. Stupid phone. /Alexander

Re: grep -R without directory argument

2015-04-30 Thread Mark Kettenis
Date: Thu, 30 Apr 2015 07:51:55 +0200 From: Martin Natano nat...@natano.net grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a fallback when no directories are

Re: grep -R without directory argument

2015-04-30 Thread Alexander Hall
On April 30, 2015 7:51:55 AM GMT+02:00, Martin Natano nat...@natano.net wrote: grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a fallback when no directories are specified

Re: grep -R without directory argument

2015-04-30 Thread Stuart Henderson
On 2015/04/30 07:51, Martin Natano wrote: grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a fallback when no directories are specified would make sense. POSIX says If no

Re: grep -R without directory argument

2015-04-30 Thread David Vasek
On Thu, 30 Apr 2015, Stuart Henderson wrote: On 2015/04/30 07:51, Martin Natano wrote: grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a fallback when no directories are

Re: grep -R without directory argument

2015-04-30 Thread Ian Darwin
On 2015-04-30 04:16, Mark Kettenis wrote: Date: Thu, 30 Apr 2015 07:51:55 +0200 From: Martin Natano nat...@natano.net grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a

Re: grep -R without directory argument

2015-04-30 Thread Todd C. Miller
On Thu, 30 Apr 2015 07:51:55 +0200, Martin Natano wrote: grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a fallback when no directories are specified would make sense.

Re: grep -R without directory argument

2015-04-30 Thread Todd C. Miller
On Thu, 30 Apr 2015 05:58:57 -0600, Todd C. Miller wrote: GNU grep warns in this case before reading from stdin which seems reasonable. % grep -R foo grep: warning: recursive search of stdin ... I'd rather add a warning than change the behavior. Trivial diff to add the warning. - todd

Re: grep -R without directory argument

2015-04-30 Thread Alexander Hall
On April 30, 2015 2:02:23 PM GMT+02:00, Todd C. Miller todd.mil...@courtesan.com wrote: On Thu, 30 Apr 2015 05:58:57 -0600, Todd C. Miller wrote: GNU grep warns in this case before reading from stdin which seems reasonable. % grep -R foo grep: warning: recursive search of stdin ... I'd

grep -R without directory argument

2015-04-29 Thread Martin Natano
grep reads from standard input when no files are specified. It also does so when -R is used, which doesn't really make sense. I think using the current working directory as a fallback when no directories are specified would make sense. POSIX says If no file operands are specified, the standard