From c6d11d26863089d614160a0ae8eda4f18efe11fd Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Thu, 10 Oct 2019 09:36:10 +0330 Subject: readme update --- README.md | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 111455c..d79dd3e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ The makefile assumes clang is called `clang` and llvm-config is called `llvm-con ```bash make CXX=clang-9.0 LLVM_CONF=llvm-config-9.0 ``` - ## Usage A simple usage example:
```bash @@ -33,32 +32,37 @@ If your build tool doesn't do that, you can just use [bear](https://github.com/r You can also skip the compilation database alltogether passing cgrep `--` after the input file name which means you have chosen not to pass it anything.
You can pass the options by hand since cgrep is a Clang instance so it recognizes every option clang has.
+cgrep uses ANSI escape sequences for colors so your terminal should support those.
+ ## Options Here's an option list though it might not be necessarily up-to-date.
For an up-to-date list, you can run `crep --help`.
```bash - -A= - same as grep, how many lines after the matched line to print - -B= - 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= - 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 - -macro - match macro definitions - -mainfile - mathc identifiers in the main file only - -memfunc - match member functions only - -memvar - match member variables only - -nameddecl - matches all named declrations - -regex= - the regex to match against - -struct - match structures only - -syshdr - match identifiers in system header as well - -union - match unions only - -var - match variables only + -A= - same as grep, how many lines after the matched line to print + -B= - 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= - recursively goes through all the files and directories. assumes compilation databases are present for all source files. + --extra-arg= - Additional argument to append to the compiler command line + --extra-arg-before= - Additional argument to prepend to the compiler command line + --func - match functions only + --header - match headers in header inclusions + --macro - match macro definitions + --mainfile - match identifiers in the main file only + --memfunc - match member functions only + --memvar - match member variables only + --nameddecl - matches all named declrations + -p= - Build path + --regex= - the regex to match against + --struct - match structures only + --syshdr - match identifiers in system header as well + --union - match unions only + --var - match variables only ``` `cgrep` is a clang tool, so it will accecpt all valid clang commandline options.
-- cgit v1.2.3