fix: quick-open file search returns no results (#213)

The ripgrep command used --hidden with positive re-inclusion globs
('.github', '.github/**') to keep .github files visible.  However,
positive globs in ripgrep act as a whitelist — once present, only files
matching those positive patterns are returned, which excluded every
non-dotfile (including CLAUDE.md and all source files).

Drop --hidden entirely so rg uses its default behavior: skip hidden
dirs, respect .gitignore, and return all normal files.
This commit is contained in:
Jinjing
2026-03-29 19:09:33 -07:00
committed by GitHub
parent 774a405e58
commit aaece3483b
+4 -19
View File
@@ -39,27 +39,12 @@ export async function listQuickOpenFiles(rootPath: string, store: Store): Promis
'rg',
[
'--files',
'--hidden',
'--glob',
'!.git',
'--glob',
'!.git/**',
// Why: --hidden + positive re-inclusion globs (e.g. '.github') made
// ripgrep treat them as a whitelist, filtering out every non-dotfile.
// Without --hidden, rg skips dot-dirs by default and respects
// .gitignore, so normal files like CLAUDE.md are returned correctly.
'--glob',
'!**/node_modules',
'--glob',
'!**/node_modules/**',
'--glob',
'!.*',
'--glob',
'!.*/*',
'--glob',
'!**/.*',
'--glob',
'!**/.*/**',
'--glob',
'.github',
'--glob',
'.github/**',
authorizedRootPath
],
{