jj-file-search
searches file contents in a Jujutsu revision
TLDR
SYNOPSIS
jj file search [options] --pattern PATTERN [filesets...]
DESCRIPTION
jj file search prints each line that matches the given pattern, prefixed by the file path. It searches the tree of a revision (default @), not an on-disk working tree that may include untracked files.Patterns use the same string-pattern syntax as revsets. Omit the kind to treat the pattern as a regular expression. For a glob, the whole line must match, so wrap the text: `--pattern 'glob:*foo*'`. See the revsets documentation for the full pattern language.
PARAMETERS
-p, --pattern PATTERN
Pattern to search for on a single line. Uses Jujutsu string-pattern syntax (`kind:pattern`). The kind defaults to regex when omitted.FILESETS
Only search files matching these prefixes. Default: all files in the revision.-r, --revision REVSET
Revision to search (default: working-copy commit @).--name-only
Print only paths of files that contain a match, not the matched lines.-n, --line-number
Prefix each matched line with its 1-based line number within the file.
INSTALL
CAVEATS
Subcommand of jj. --pattern is required. This is an early version of the command and does not search files concurrently. Glob patterns match the entire line, not a substring.
SEE ALSO
jj-file(1), jj-file-list(1), grep(1), git-grep(1), jj(1)
