grep ()
{
/usr/bin/grep --color=auto $*
}
to
grep ()
{
/usr/bin/grep --color=auto "$@"
}
On Tue, Jul 26, 2016 at 7:46 AM, bibek ghimire <gbibek@gmail.com> wrote:
> /usr/bin/grep --color=auto $*
That function is erroneous due to the use of unquoted $*.
Use this instead, which fixes that, and also works when the executable
grep is not in /usr/bin:
grep() { env grep --color=auto "$@"; }