Il 25/11/2012 10:03, David Wilson ha scritto: > On 25 November 2012 10:57, Paul Eggert <[email protected]> wrote: >> On 11/24/2012 10:13 PM, David Wilson wrote: >>> my very old shell macros no longer function as they once did. >> >> There's not much context here, so it's not clear >> what you're asking for. Do you want grep to ignore >> -r when no file names are being passed? > > No, that would imply reverting the change which is unlikely to happen > (and cause a further breaking change for anyone relying on the new > behaviour).
But it _is_ the one that is causing problems for you, right? ** 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. I would be in favor of reverting the patch. I never liked the idea. Paolo > I want to know how to emulate the old behaviour, as this > isn't obvious. My only solution is to wrap grep in a macro that parses > its arguments, and passes -r only if paths have been provided on the > command line.
