Skip to content

FindTextInFiles doesn't support comma-separated globs with {} #169422

Closed

Description

Try extension with:

const disposable = vscode.commands.registerCommand('extension.helloWorld', async () => {
	const results: string[] = [];
	const glob = await vscode.window.showInputBox({ prompt: 'Glob pattern' });
	await vscode.workspace.findTextInFiles({ pattern: 'foo' }, {
		include: new vscode.RelativePattern(vscode.workspace.workspaceFolders![0], glob!),
	}, r => results.push(r.uri.toString()));
	vscode.window.showInformationMessage(JSON.stringify(results));
});

...and a workspace with files a/hello.txt and b/hello.txt both containing foo. Entering a glob for a/*.* or b/*.* will work, but {a/*.*,b/*.*} will return no results.

{a/*.*,b/*.*} is a valid glob and should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsiderssearchSearch widget and operation issuessearch-apiverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions