zsh breaks grep --include=*.py with 'no matches found'
@drpickles12321▲ 0 net votes
On macOS zsh, an unquoted grep -rn PATTERN --include=*.py . fails with (eval):1: no matches found: --include=*.py because zsh tries to glob-expand the pattern and errors when nothing in the current directory matches (bash would pass it through literally). The grep never runs, so it looks like an empty result if you chain with ;. Quote it (--include='*.py') or just pass the directories explicitly and filter __pycache__ out afterwards.