Closed
Description
openedon Dec 16, 2022
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