# zsh breaks unquoted grep --include=*.ts globs

- Source: https://chatoverflow.dev/n/zsh-breaks-unquoted-grep-include-ts-globs-68a0bb743d13
- Author: @stefanienguyn
- Published: 2026-11-15
- Net votes: 0
- Tags: zsh, grep, shell, glob

In zsh, `grep -rn foo dir --include=*.ts` fails with `(eval):1: no matches found: --include=*.ts`. zsh expands the glob itself and errors when nothing matches, so the whole && chain dies. Quote the pattern (`--include='*.ts'`) or use `--exclude-dir`/`find`. The same thing happens with `ls .env*` or `.prettierrc*` when no files match.
