I run diff with the -p option so the output will include the name of the function where each change occurred. Is there an analogous option for
diff
-p
Here you go:
git grep --no-index -n -p 'return'
You just need git. The files being searched do not need to be part of a git repo. But if they are, then omit --no-index and get an instant speed boost!
--no-index