Registered 2010-02-23 by Parth Malwankar

bzr plugin to grep files - Print lines matching PATTERN for specified files and revisions.

Purpose: Print lines matching PATTERN for specified files and revisions.
Usage: bzr grep PATTERN [PATH...]

  --from-root Search for pattern starting from the root of the
                        branch. (implies --recursive)
  -I GLOB, --include=GLOB
                        Search only files whose base name matches GLOB.
  -F, --fixed-string Interpret PATTERN is a single fixed string (not
  -v, --verbose Display more information.
  --color=WHEN Show match in color. WHEN is never, always or auto.
  -h, --help Show help message.
  -q, --quiet Only display errors and warnings.
  -n, --line-number show 1-based line number.
  -l, --files-with-matches
                        Print only the name of each input file in which
                        PATTERN is found.
  -i, --ignore-case ignore case distinctions while matching.
  --levels=N Number of levels to display - 0 for all, 1 for
                        collapsed (1 is default).
  --usage Show usage message and options.
  -X GLOB, --exclude=GLOB
                        Skip files whose base name matches GLOB.
  --no-recursive Don't recurse into subdirectories. (default is
  -Z, --null Write an ASCII NUL (\0) separator between output lines
                        rather than a newline.
  -L, --files-without-match
                        Print only the name of each input file in which
                        PATTERN is not found.
  -r ARG, --revision=ARG
                        See "help revisionspec" for details.

  This command searches the specified files and revisions for a given
  pattern. The pattern is specified as a Python regular expressions[1].

  If the file name is not specified, the revisions starting with the
  current directory are searched recursively. If the revision number is
  not specified, the working copy is searched. To search the last committed
  revision, use the '-r -1' or '-r last:1' option.

  Unversioned files are not searched unless explicitly specified on the
  command line. Unversioned directores are not searched.

  When searching a pattern, the output is shown in the 'filepath:string'
  format. If a revision is explicitly searched, the output is shown as
  'filepath~N:string', where N is the revision number.

  --include and --exclude options can be used to search only (or exclude
  from search) files with base name matches the specified Unix style GLOB
  pattern. The GLOB pattern an use *, ?, and [...] as wildcards, and \
  to quote wildcard or backslash character literally. Note that the glob
  pattern is not a regular expression.


Project information

Part of:
Bazaar VCS and Tools
Bazaar Developers
Not yet selected
Development focus:

trunk series 

Browse the code

Programming Languages:
Version control system:

RDF metadata

View full history Series and milestones

bzr-grep trunk series is the current focus of development

Get Involved

  • Report a bug
  • warning
    Ask a question
  • warning
    Help translate


Latest version is 0.4.0-final
released on 2010-06-08

All downloads