cgrep: Command line tool

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

Cgrep: a context-aware grep for source codes


[Skip to Readme]

Properties

Versions 6.4, 6.4.1, 6.4.2, 6.4.3, 6.4.3.1, 6.4.4, 6.4.5, 6.4.6, 6.4.7, 6.4.8, 6.4.9, 6.4.10, 6.4.11, 6.4.12, 6.4.13, 6.4.14, 6.4.15, 6.4.16, 6.4.17, 6.4.18, 6.4.19, 6.4.20, 6.4.21, 6.4.22, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.6, 6.5.7, 6.5.8, 6.5.9, 6.5.10, 6.5.11, 6.5.12, 6.5.13, 6.5.15, 6.6, 6.6.1, 6.6.2, 6.6.3, 6.6.4, 6.6.5, 6.6.7, 6.6.8, 6.6.9, 6.6.10, 6.6.11, 6.6.12, 6.6.13, 6.6.14, 6.6.15, 6.6.16, 6.6.17, 6.6.20, 6.6.22, 6.6.23, 6.6.24, 6.6.25, 6.6.30, 6.6.32, 8.0.0, 8.1.0
Change log None available
Dependencies ansi-terminal (>=0.5), array (>=0.4), async (>=2.0), base (<5.0), bytestring (>=0.10), cmdargs (>=0.10), containers (>=0.5), directory (>=1.2), dlist (>=0.3), either (>=4.0), filepath (>=1.3), ghc-prim (>=0.2), mtl (>=2.0), process, regex-base (>=0.90), regex-pcre (>=0.90), regex-posix (>=0.90), safe (>=0.3), split (>=0.2), stm (>=2.1), stringsearch (>=0.3), transformers, unix-compat (>=0.4), unordered-containers (>=0.1) [details]
License GPL-2.0-only
Author Nicola Bonelli
Maintainer Nicola Bonelli <nicola@pfq.io>
Category Utils
Home page http://awgn.github.io/cgrep/
Uploaded by NicolaBonelli at 2016-05-25T14:18:21Z

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for cgrep-6.6.5

[back to package description]

CGrep: a context-aware grep for source codes

Hackage [![Join the chat at https://gitter.im/awgn/cgrep](https://badges.gitter.im/awgn/cgrep.svg)](https://gitter.im/awgn/cgrep?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Usage

Cgrep 6.6.5. Usage: cgrep [OPTION] [PATTERN] files...

cgrep [OPTIONS] [ITEM]

Pattern:

-f --file=FILE             Read PATTERNs from file (one per line)
-w --word                  Force word matching
-p --prefix                Force prefix matching
-s --suffix                Force suffix matching
-e --edit                  Use edit distance
-G --regex                 Use regex matching (posix)
-P --regex-pcre            Use regex matching (pcre)
-i --ignore-case           Ignore case distinctions

Context filters (generic):

-c --code                  Enable search in source code
-m --comment               Enable search in comments
-l --literal               Enable search in string literals

Semantic (generic):

-S --semantic              "code" pattern: _, _1, _2... (identifiers), $,
                           $1, $2... (optionals), ANY, KEY, STR, CHR, LIT,
                           NUM, HEX, OCT, OR. -> e.g. "_1(_1 && \$)" search
                           for move constructors, "struct OR class _ { OR :
                           OR <" search for a class declaration

C/C++ language:

  --identifier            Identifiers
  --keyword               Keywords
  --directive             Preprocessing directives
  --header                Headers names
  --number                Literal numbers
  --string                Literal strings
  --char                  Literal chars
  --oper                  Operators

Output control:

   --max-count=INT         Stop search in files after INT matches
   --language-filter=ITEM  Specify languages. ie: Cpp, +Haskell, -Makefile
   --language-force=ITEM   Force the language
   --language-map          Lists the language mappings
   --magic-filter=ITEM     Use unix magic as file-filter
-v --invert-match          Select non-matching lines
   --multiline=INT         Enable multi-line matching
-r --recursive             Enable recursive search (don't follow symlinks)
   --prune-dir=ITEM        Do not descend into dir
-R --deference-recursive   Recursive, follow symlinks

Output format:

   --show-match            Show list of matching tokens
   --color                 Use colors to highlight the matching strings
   --no-color              Do not use colors (override configAutoColor)
-h --no-filename           Suppress the file name prefix on output
-N --no-linenumber         Suppress the line number on output lines
   --count                 Print only a count of matching lines per file
   --filename-only         Print only the name of files containing matches
   --format=STRING         Format output. Var: #f #n #l #t ## #, #; #0
                           #1... e.g. "#f:#n #0 #1"
   --json                  Format output as json object
   --xml                   Format output as xml document
   --vim                   Invoke vim program by passing the files that
                           match

Concurrency:

-j --jobs=INT              Number of jobs
   --cores=INT             Number of physical processors utilized
   --chunk=INT             Specify the length of chunks
-a --asynch                Process chunks asynchronously

Miscellaneous:

-d --debug=INT             Debug level: 1, 2 or 3
-n --no-quick              Disable quick-search mode
-? --help                  Display help message
-V --version               Print version information
   --numeric-version       Print just the version number