grep.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:sublimeplugins 作者: ktuan89 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号