Depending on the way you want to handle directories contents,
- " grep -d recurse "
grep -d recurse
will do it (handling recursively directories), or - "grep -d skip "
grep -d skip
(ignoring directories and their content).
You could have this be automatic, by adding it to ~/.profile or ~/.bashrc (one user) or /etc/profile or /etc/bashrc (all users)
- alias grep="/bin/grep -d skip"
alias grep="/bin/grep -d skip"