ripgrep——命令行搜索工具

ripgrep——命令行搜索工具

该项目的 GitHub 地址为:BurntSushi/ripgrep,可以快速的命令行进行搜索,支持正则表达式。

安装

1
$ brew install ripgrep

使用

直接搜索wd,可以深入文件内部搜索,并在匹配处高亮:

1
2
3
4
$ rg wd

精雕细琢.R
5:setwd("~/Documents/notes/source/_postshttps://czxb.github.io/ar/")

正则表达式搜索:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ rg -i '.*[0-9]\.jpg$'

待整理文件/_posts/使用终端查询天气.md
139:convert 1.jpeg <( curl wttr.in/广州_tqp0_lang=zh.png ) -geometry +50+50 -composite 2.jpg

待整理文件/_posts/m_mzitu网站整站爬取程序.md
91: !curl `w' -e http://m.mzitu.com/ -o `name'_1.jpg
129: !curl `w' -e http://m.mzitu.com/ -o `name'_1.jpg

图表库/html邮件模板/templates/oxygen/progress.html
13:Pink Step One - http://s3.amazonaws.com/swu-filepicker/iRYXoEbnSQAMzQYRy6hG_v33_03.jpg
14:White Step One - http://s3.amazonaws.com/swu-filepicker/0oYLLViRBKv7a0Lzh6vC_v3_03.jpg
17:Pink Step Two - http://s3.amazonaws.com/swu-filepicker/YL3H3V5bRyGuy6pess9T_v33_04.jpg
18:White Step Two - http://s3.amazonaws.com/swu-filepicker/piymv8dOQmuAc8nxb4Or_v3_04.jpg
21:Pink Step Three - http://s3.amazonaws.com/swu-filepicker/caYiXZF9TBS23k4EPXIN_v33_05.jpg
22:White Step Three - http://s3.amazonaws.com/swu-filepicker/YSTlgtgaTSa897tPTUhl_v3_05.jpg

高亮效果:

# shell

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×