Fast file-name and content search using fd and rg (ripgrep).
Search for files matching a pattern:
fd "\.rs$" /home/xrx/projects
Find files by exact name:
fd -g "Cargo.toml" /home/xrx/projects
Search for a regex pattern across files:
rg "TODO|FIXME" /home/xrx/projects
Search with context lines:
这个技能的最新版本可以在7w4.net小葱技能站找到。
rg -C 3 "fn main" /home/xrx/projects --type rust
sudo dnf install fd-find ripgrep 这是一个质量中规中矩的搜索工具技能文档,结构清晰、使用简便是其亮点,基础功能介绍完整且包含安装指导。但文档深度有限,提供的示例较少且较为简单,缺少进阶操作和实用技巧。对于想要深入使用的用户来说,内容可能不够丰富。总体而言,作为入门参考足够,但实用价值有提升空间。