We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0268f0c commit fa907aaCopy full SHA for fa907aa
core/cb.search/code.js
@@ -81,6 +81,7 @@ var assembleCommand = function(options) {
81
var search = function(root, args) {
82
var d = Q.defer(), prevfile = null;
83
var results = {};
84
+ var nMatches = 0;
85
86
args = _.defaults(args || {}, {
87
pattern: null,
@@ -124,6 +125,7 @@ var search = function(root, args) {
124
125
'line': _line,
126
'content': parts.join(":")
127
});
128
+ nMatches = nMatches + 1;
129
}
130
131
@@ -134,7 +136,11 @@ var search = function(root, args) {
134
136
if (code !== 0) {
135
137
d.reject(new Error("ack exited with code "+code));
138
} else {
- d.resolve(results);
139
+ d.resolve({
140
+ 'options': args,
141
+ 'files': results,
142
+ 'matches': nMatches
143
+ });
144
145
146
0 commit comments