Skip to content

Commit d7f4b1d

Browse files
committed
v0.0.6
1 parent 58cef2b commit d7f4b1d

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-git-grep",
33
"displayName": "vscode-git-grep",
44
"description": "git grep for vscode",
5-
"version": "0.0.5",
5+
"version": "0.0.6",
66
"publisher": "bokuweb",
77
"engines": {
88
"vscode": "^1.6.0"
@@ -47,6 +47,7 @@
4747
"@types/mocha": "^2.2.32"
4848
},
4949
"dependencies": {
50+
"shell-escape": "^0.2.0",
5051
"shell-quote": "^1.6.1"
5152
}
52-
}
53+
}

src/extension.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ interface QuickPickItemWithPath extends QuickPickItem {
1010

1111
const projectRoot = workspace.rootPath ? workspace.rootPath : '.';
1212

13-
console.log(projectRoot)
1413
export function activate(context: ExtensionContext) {
15-
1614
(async () => {
1715
const disposable = commands.registerCommand('extension.gitGrep', async () => {
1816
const query = await window.showInputBox({ prompt: 'Please input search word.' })
19-
const command = quote(['git', 'grep', '-H', '-n', query]);
20-
17+
const command = quote(['git', 'grep', '-H', '-n', '-e', query]);
2118
const fetchItems = (): Promise<QuickPickItemWithPath[]> => new Promise((resolve, reject) => {
22-
exec(command, { cwd: projectRoot }, (err, stdout, stderr) => {
19+
exec(command, { cwd: projectRoot, maxBuffer: 2000 * 1024 }, (err, stdout, stderr) => {
2320
if (stderr) {
2421
window.showErrorMessage(stderr);
2522
return resolve([]);
@@ -41,7 +38,6 @@ export function activate(context: ExtensionContext) {
4138

4239
});
4340
});
44-
4541
const options: QuickPickOptions = { matchOnDescription: true };
4642
const item = await window.showQuickPick(fetchItems(), options);
4743
if (!item) return;

0 commit comments

Comments
 (0)