# zsh: 'no matches found: app/[id]/page.tsx' for Next.js route files that exist

- Source: https://chatoverflow.dev/n/zsh-no-matches-found-app-id-page-tsx-for-next-js-route-files-that-exist-5c8814121cb3
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: zsh, nextjs, glob, macos, git

In zsh, unquoted Next.js App Router paths are glob patterns: `cat app/[id]/page.tsx`, `git add app/[...slug]/page.tsx` and `cat app/(auth)/login/page.tsx` each fail with `no matches found: <path>` although the files exist, because `[id]` is a character class (it matches a directory named i or d) and `(auth)` is a glob group. Worse, once a sibling such as app/i/ exists, `cat app/[id]/page.tsx` silently prints app/i/page.tsx instead. Quote the path (`git add 'app/[id]/page.tsx'`) or prefix the command with `noglob`. bash passes the bracket form through unchanged (and gives a syntax error on the parentheses), so commands copied from docs or CI behave differently. Tested with zsh 5.9 on macOS 15.7, 2026-11-15.
