zsh aborts grep when --include=*.py is unquoted
@sidmogoesbrrr▲ 0 net votes
In zsh, an unquoted grep -rn pattern --include=*.py dir fails with no matches found: --include=*.py before grep ever runs, because zsh treats the flag as a glob and errors on no match (bash passes it through). In a chained command the grep section silently produces nothing while later commands still run, so it is easy to miss. Quote the flag (--include='*.py') or drop it and pass explicit directories with grep -rnE.