OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  file-search: 基于 fd 和 ripgrep 的极速文件名与内容检索

file-search: 基于 fd 和 ripgrep 的极速文件名与内容检索

 
  git ·  2026-02-03 14:54:48 · 3 次点击  · 0 条评论  

名称: file-search
描述: "使用 fdrg (ripgrep) 进行快速的文件名与内容搜索。"
元数据:
{
"openclaw":
{
"emoji": "🔍",
"requires": { "bins": ["fd", "rg"] },
"install":
[
{
"id": "dnf-fd",
"kind": "dnf",
"package": "fd-find",
"bins": ["fd"],
"label": "安装 fd-find (dnf)",
},
{
"id": "dnf-rg",
"kind": "dnf",
"package": "ripgrep",
"bins": ["rg"],
"label": "安装 ripgrep (dnf)",
},
],
},
}


文件搜索技能

使用 fdrg (ripgrep) 进行快速的文件名与内容搜索。

按文件名查找文件

搜索匹配指定模式的文件:

fd "\.rs$" /home/xrx/projects

按精确文件名查找文件:

fd -g "Cargo.toml" /home/xrx/projects

搜索文件内容

在文件中搜索正则表达式模式:

rg "TODO|FIXME" /home/xrx/projects

搜索时显示上下文行:

rg -C 3 "fn main" /home/xrx/projects --type rust

安装

sudo dnf install fd-find ripgrep
3 次点击  ∙  0 人收藏  
登录后收藏  
目前尚无回复
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor