bug-grep
[Top][All Lists]
Advanced

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

[patch #6474] Issue warning if recursively searching stdin


From: Jonathan Hartley
Subject: [patch #6474] Issue warning if recursively searching stdin
Date: Tue, 20 Mar 2012 19:37:17 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20100101 Firefox/11.0

Follow-up Comment #2, patch #6474 (project grep):

This patch has a minor downside. It's not uncommon to invoke 'grep' using an
alias or wrapper script, in order to set some commonly-used options. For
example, my own alias looks like:

alias grp='grep -rI --color --exclude-dir=.bzr --exclude-dir=.git
--exclude-dir=.hg --exclude-dir=.svn --exclude-dir=build --exclude-dir=dist
--exclude=tags'

Notice that I like to include '-r' in my alias, so all my invocations of
'grep', whether searching files or filtering stdin, will include '-r'.

Previously this was harmless and silent. But if I understand this patch
correctly, this will now output a warning every time, which I don't like.

Obviously there are workarounds, such as removing '-r' from my alias, and
typing it when I want it, or creating two aliases, one with '-r' and one
without. But personally, I'd prefer if no warning was issued.

Incidentally, I don't think I can use 'GREP_OPTIONS' instead of an alias,
because that breaks tools which invoke grep internally.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?6474>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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