jj file search adds line numbers
Introduced 2026-08-06 · score 0.92
HOW TO USE IT
When reviewing repository search results, run `jj file search -n --pattern <PATTERN>` to prefix each matching line with its file path and 1-based line number. The pattern is required and defaults to regex syntax when no kind prefix is given.
jj file search -n --pattern '<PATTERN>'WHY THIS HELPS
When reviewing repository search results, include each match's line number.
REQUIREMENTS AND LIMITATIONS
- Version: v0.44.0
- -n, --line-number: Prefix each matched line with its 1-based line number within the file.
- -p, --pattern <PATTERN> (required): Pattern to search for in a single line; supports string pattern syntax such as `kind:pattern`, defaulting to regex if the kind is omitted.
- Line numbers are 1-based and within the file.
FIRST-PARTY EVIDENCE
- 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
Check the installed version and the source before using it. Entry JSON