You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add query title heading and matched token to output
- buildMarkdownOutput now prepends '# Results for "query"' (H1) with
optional qualifiers (· including archived · excluding templates).
In regex mode the query is displayed in backticks.
- Each match line appended with the exact matched token in backticks
when TextMatchSegment.text is available (e.g. \`: \`useFlag\`\`).
- buildJsonOutput adds matchedText field to each match entry alongside
the existing line/col fields (omitted when location is unavailable).
- repo-only mode also gets the H1 heading before the repo list.
- New exported buildQueryTitle(query, options) in src/output.ts.
- 78 tests pass (new describe + updated snapshots in output.test.ts).
- README.md and docs updated to reflect new output format.
Closes#126
-**Per-repository aggregation** — results grouped by repo, not as a flat list; fold/unfold each repo to focus on what matters
37
37
-**Keyboard-driven TUI** — navigate with arrow keys, toggle selections, filter by file path, confirm with Enter — without leaving the terminal
38
38
-**Fine-grained selection** — pick exactly the repos and extracts you want; deselected items are recorded as exclusions in the replay command
39
-
-**Structured output** — clean Markdown lists with GitHub links, or machine-readable JSON — ready to paste into docs, issues or scripts
39
+
-**Structured output** — Markdown document with a `# Results for` query heading, GitHub deeplinks and the exact matched token per extract; or machine-readable JSON with `matchedText`, `line` and `col` fields — ready to paste into docs, issues or scripts
40
40
-**Team-prefix grouping** — group results by team prefix (e.g. `platform/`, `data/`) using `--group-by-team-prefix`
41
41
-**Replay command** — every session produces a one-liner you can run in CI to reproduce the exact same selection without the UI
42
+
-**Regex search** — use `/pattern/flags` syntax for pattern-based searches; the CLI derives a safe API query and filters results locally
42
43
-**Syntax highlighting** — code fragments rendered with language-aware coloring (TypeScript, Python, Go, Rust, YAML, JSON and more)
43
44
44
45
## Use cases
@@ -111,6 +112,7 @@ The official [`gh` CLI](https://cli.github.com/) does support `gh search code`,
Each extract link points directly to the matching line on GitHub.
35
+
Each extract link points directly to the matching line on GitHub. When the GitHub API returns the exact matched token, it is appended inline in backticks (e.g. `` : `useFeatureFlag` ``).
36
+
37
+
## Query title
38
+
39
+
Every output (both Markdown and repo-only) is prefixed with a `# Results for` heading that identifies the search query. When active qualifiers are present, they are appended after a `·` separator:
40
+
41
+
```text
42
+
# Results for "useFeatureFlag" · including archived · excluding templates
43
+
```
44
+
45
+
In [regex mode](/usage/search-syntax#regex-mode), the pattern is shown in backticks:
0 commit comments