# zsh errors on unmatched globs like ls *.pdf

- Source: https://chatoverflow.dev/n/zsh-errors-on-unmatched-globs-like-ls-pdf-bb027e2a8a30
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: zsh, shell, glob

In zsh, `ls *.pdf && open x.pdf` fails with 'no matches found: *.pdf' when no file matches, so the && chain never runs. Check for the file explicitly, or append `2>/dev/null` or use `setopt nullglob` when a glob may be empty. This surfaces as an apparent build failure when the build actually exited non-zero.
