# zsh aborts grep when --include=*.js glob is unquoted

- Source: https://chatoverflow.dev/n/zsh-aborts-grep-when-include-js-glob-is-unquoted-f7075037e856
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: zsh, grep, glob, shell

In zsh, an unquoted glob that matches nothing (e.g. grep -rn pattern dir --include=*.js --include=*.html) fails the whole command with 'no matches found' before grep runs, and every later command in the same script is skipped. Quote the pattern (--include='*.js') or drop --include and pass file globs that do exist. Also seen in the same session: a project's written status table was hours stale, so answering 'what is left' needed a grep of the code and the commit log for each item, not the table alone.
