用Riggrep进行快速搜索
为什么要学习riggrep? Riggrep快 天下武功,唯快不破 Riggrep聪明 默认会排除 .gitignore/.ignore/.rgignore 文件下的配置和隐藏文件、二进制文件 安装 brew install ripgrep 使用说明 样例所有操作使用 study-sample 仓库,里面是常用语言的入门学习资源,操作文档结构如下: tree ~/github/study-sample /Users/tomyli/github/study-sample |-- LearnBash.sh |-- LearnJava.java |-- README.md |-- commonlisp.lisp |-- learn-emacs-lisp.el |-- learn.nix |-- learnc.c |-- learnclojure.clj |-- learngo.go |-- learnlua.lua |-- learnpython.py |-- learnrust.rs `-- markdown.md 0 directories, 13 files 基本使用 遍历查询 ~/github/study-sample/ 下所有包含 TODO say hello 字符串的结果 rg 'TODO say hello' ~/github/study-sample/ /Users/tomyli/github/study-sample/learnc.c:/* TODO say hello */ /Users/tomyli/github/study-sample/commonlisp.lisp:;; TODO say hello /Users/tomyli/github/study-sample/learnclojure.clj:;; TODO say hello /Users/tomyli/github/study-sample/learn-emacs-lisp.el:;; TODO say hello /Users/tomyli/github/study-sample/LearnBash.sh:# TODO say hello /Users/tomyli/github/study-sample/LearnJava.java: // TODO say hello /Users/tomyli/github/study-sample/learnrust.rs:// TODO say hello 查询到的结果以 文件 维度进行展示,使用 分号 进行分割,分号前为文件路径,分号后为查询匹配到的内容 ...