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

Interesting idea, thanks Eric. Unfortunately, my bash-fu is not sufficient to
fill in the ellipsis. My understanding is that the alias would have to be such
that it expands the command-line:

$ grp XXX

into

GREP_OPTIONS='--exclude-dir ...'; grep XXX; unset GREP_OPTIONS'

Is this remotely right? How do I get 'XXX' (what I typed on the command line
after my alias) to appear in the middle of the alias expansion, rather than at
the end of it? Or should I be invoking grep in a new shell somehow?

Also, I don't yet understand how this would work when piping data in. My
attempt above fails to send piped data to the 'grep' command.

The answer 'go read man bash' is not entirely inappropriate, if you are fairly
sure it can be done.

    _______________________________________________________

Reply to this item at:

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

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


Reply via email to