aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-11-15 11:23:34 +0000
committerbloodstalker <thabogre@gmail.com>2018-11-15 11:23:34 +0000
commit78a2b92d4409c6a9099f8a92cd5c89d2592ddfe2 (patch)
tree27511368ad1593bc123f1fda3628c84c200592a9 /README.md
parentupdate (diff)
downloadcgrep-78a2b92d4409c6a9099f8a92cd5c89d2592ddfe2.tar.gz
cgrep-78a2b92d4409c6a9099f8a92cd5c89d2592ddfe2.zip
readme update
Diffstat (limited to '')
-rw-r--r--README.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index b240803..304af3a 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ make
## Usage
A simple usage example:<br/>
```bash
-cgrep --func --var --regex n[aA]m ./cgrep.cpp
+cgrep -A 1 -B 1 --func --var --regex n[aA]m ./cgrep.cpp
```
Pleade do note that the regex will pass through both C++ and the regex engine, so if you would want to escape `\`, the regex you pass as the commandline arg would be `\\\\` instead of the normal `\\`.<br/>
In order for cgrep to work, you need to have a compilation database, tools like cmake can generate one for you.<br/>
@@ -26,9 +26,14 @@ Here's an option list though it might not be necessarily up-to-date.<br/>
For an up-to-date list, you can run `crep --help`.<br/>
```bash
+ -A=<int> - same as grep, how many lines after the matched line to print
+ -B=<int> - same as grep, howm many lines before the matched line to print
-all - turns on all switches other than nameddecl
-awk - outputs location in a gawk freidnly format
+ -call - match function calls only
-class - match class declrations only
+ -cxxcall - match member function calls only
+ -declrefexpr - matches declrefexpr
-dir=<string> - recursively goes through all the files and directories. assumes compilation databases are present for all source files.
-func - match functions only
-header - match headers in header inclusions
@@ -41,7 +46,6 @@ For an up-to-date list, you can run `crep --help`.<br/>
-struct - match structures only
-syshdr - match identifiers in system header as well
-union - match unions only
- -var - map variables only
-
+ -var - match variables only
```
`cgrep` is a clang tool, so it will accecpt all valid clang commandline options.<br/>