pub fn grep(
dir: &Path,
pattern: &str,
glob: Option<&str>,
ignore_case: bool,
manifest_only: bool,
scope: Option<&str>,
real_path: bool,
limit: Option<usize>,
json: bool,
) -> Result<()>Expand description
str grep:正文全文检索(打印 grep_hits 的结果,按分支分组)。
--real-path 让命中行显示绝对路径(便于管道给其它命令);JSON 恒含 file 绝对路径;
--scope / [dir] 决定检索范围(缺省当前节点)。