def search(self, query):
if self.grep_command is not None:
command = self.grep_command.format(pipes.quote(query))
elif self.show_in_view:
command = grepFormatStr().format(
grepPath(self.window),
pipes.quote(query)
)
else:
# we need quick results
command = quickGrepFormatStr().format(
grepPath(self.window),
pipes.quote(query)
)
sublime.status_message("grepping {0} ...".format(pipes.quote(query)))
output, _ = run_bash_for_output(command)
lines = output.split('\n')
self.show_results(query, lines)
评论列表
文章目录