{
  "slug": "jj-file-search-prints-matched-lines-6130358974a6",
  "title": "jj file search prints matched lines",
  "tools": [
    "jj"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-06T01:42:10.000Z",
  "announced_at": "2026-08-06T01:42:10.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When searching repository files and reviewing matching content, run `jj file search` with a pattern to print each matching line prefixed by its file path. Add `--name-only` to print only paths containing matches.",
    "examples": [
      "jj file search --pattern <PATTERN> [FILESETS...]",
      "jj file search --pattern <PATTERN> --name-only [FILESETS...]"
    ],
    "gotchas": [
      "Version: v0.44.0",
      "--pattern <PATTERN> / -p <PATTERN> (required): Pattern to search for in a single line; defaults to regex syntax. A glob pattern must match the whole line.",
      "--name-only: Print paths of files containing a match, not matched lines; conflicts with `--line-number`.",
      "FILESETS...: Restrict the search to files matching these prefixes; without them, search all files.",
      "--revision <REVSET> / -r <REVSET>: Revision whose files to search; defaults to `@`."
    ]
  },
  "why_it_matters": "When searching repository files and reviewing matching content, print each matched line with its path.",
  "before": "Previously, `jj file search` printed only paths of files containing a match; use `--name-only` for that behavior.",
  "sources": [
    "https://github.com/jj-vcs/jj/releases/tag/v0.44.0",
    "https://github.com/jj-vcs/jj/blob/v0.44.0/cli/src/commands/file/search.rs"
  ],
  "rank": 0.97037,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-tools-20261017",
    "verdict_id": "wave1b-tools-20261017:wave1b-tools-20261017-308141f59d306654-4:gate",
    "evidence_hash": "45541c81170897c549c60174d7b60409c4ed2f6670195de1cd807c7d79ca2b19"
  },
  "review": {
    "draft_hash": "40c54bd135c82581bbaa41d393c08a5c931120d655010eaf1a987c9fbbcc853a",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-tools-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
