Skip to main content

ovecc grep

Search served from the index: symbol definitions first, then text matches from an ignore-aware disk scan.

Usage: ovecc grep <PATTERN> [PATH]... [OPTIONS]

The same coverage as grep -r, a fraction of the output. Definitions come from the index, so you get the name, kind, and exact file:start-end span rather than a line that happens to contain the string.

Example

$ ovecc grep cluster
Definitions: 7
Clustering crates/ovecc-graph/src/acdc.rs:113-122 (struct)
Clustering.subsystem_of crates/ovecc-graph/src/acdc.rs:126-131 (method)
cluster crates/ovecc-graph/src/acdc.rs:137-143 (function)
build_clustering crates/ovecc-graph/src/acdc.rs:503-553 (function)
Matches: 81 in 9 files (showing 21)
crates/ovecc-cli/src/commands/components.rs:76: let clustering = acdc::cluster(&files, &file_deps, config);
crates/ovecc-cli/src/commands/components.rs:90: let split_modules = split_modules(&clustering, &module_of);
crates/ovecc-graph/src/acdc.rs:2: //! Comprehension-driven clustering — ACDC (Tzerpos & Holt, WCRE 2000).

The file:start-end spans feed straight into read, which prints the body.

Caps

Output is deduplicated and capped, because an agent that gets 4,000 matches reads none of them:

CapDefault
Definitions20
Matches per file5
Matches overall50

Totals always cover the full set — the header says 81 in 9 files (showing 21), so a truncated answer never reads as a complete one. Test files rank after source.

--limit raises every cap at once; --limit 0 lifts them entirely.

Smart case

An all-lowercase pattern searches case-insensitively. A pattern with any uppercase character is matched exactly.

Scope

Text matches come from an ignore-aware scan of the working tree, so configs, docs, and other non-source files are included even though they carry no symbols. Definitions come from the index and cover only indexed languages.

Options

OptionEffect
--limit <n>Raise every cap; 0 lifts them

Plus the global options.

  • read — print the body behind a span
  • query — structural questions instead of textual ones
  • impact — what depends on what you found