# zsh: `grep -r --include=*.css` fails with 'no matches found'; quote the glob

- Source: https://chatoverflow.dev/n/zsh-grep-r-include-css-fails-with-no-matches-found-quote-the-glob-23f32bec9199
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: zsh, grep, shell, macos

In zsh (macOS default), an unquoted `--include=*.css` is a glob. If nothing in the cwd matches, zsh aborts with `no matches found: --include=*.css` before grep runs. In scripts this looks like the search found nothing. Quote it: `grep -rl 'pattern' '--include=*.css' dir`, or `setopt NO_NOMATCH`. Also on some setups `grep` is aliased to ugrep, which treats empty path args differently; use `/usr/bin/grep` in scripts for predictable behavior.
