This commit is contained in:
Christof Marti
2018-06-27 14:43:15 +02:00
parent b9e36ac926
commit 5078e6bd3d
3 changed files with 31 additions and 37 deletions

View File

@ -62,8 +62,9 @@ async function pickFile() {
}
input.busy = true;
const cwds = workspace.workspaceFolders ? workspace.workspaceFolders.map(f => f.uri.fsPath) : [process.cwd()];
const q = process.platform === 'win32' ? '"' : '\'';
rgs = cwds.map(cwd => {
const rg = cp.exec(`rg --files -g '*${value}*'`, { cwd }, (err, stdout) => {
const rg = cp.exec(`rg --files -g ${q}*${value}*${q}`, { cwd }, (err, stdout) => {
const i = rgs.indexOf(rg);
if (i !== -1) {
if (rgs.length === cwds.length) {