diff options
-rw-r--r-- | README.md | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -16,7 +16,7 @@ Should be more or less fine for other C-family languages as well but I haven't t The goal is to make the options and features as similar to `grep` as possible for ease of use.<br/> ## Building -Assuming you have the llvm/clang libraries(the build file will read your llvm options using `llvm-config` so make sure it's in path), just run:<br/> +Assuming you have the llvm/clang libraries (the build file will read your llvm options using `llvm-config` so make sure it's in path), just run:<br/> ```bash git clone https://github.com/bloodstalker/cgrep cd cgrep @@ -25,29 +25,29 @@ git submodule update make ``` If you have installed LLVM but don't have `llvm-config`, you are missing the dev package for LLVM.<br/> -`cgrep` supports LLVM 5,6,7,8 and 9. For 10. the latest tested trunk version is:374971.<br/> +`cgrep` supports LLVM 5,6,7,8 and 9. For 10 the latest tested trunk version is: 374971.<br/> The makefile assumes clang is called `clang` and llvm-config is called `llvm-config`. On some distros, the names might not be the same. In those cases use `CXX` and `LLVM_CONF` to pass the values to the makefile like so:<br/> ```bash make CXX=clang-9.0 LLVM_CONF=llvm-config-9.0 ``` -For windows builds, cygwin builds are supported. get llvm and clang along with their sources and build like usual.<br/> +For windows builds, cygwin builds are supported. Get llvm and clang along with their sources and build like usual.<br/> ## Usage A simple usage example:<br/> ```bash 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/> +Please 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 command line 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/> If your build tool doesn't do that, you can just use [bear](https://github.com/rizsotto/Bear) or [scan-build](https://github.com/rizsotto/scan-build).<br/> -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.<br/> +You can also skip the compilation database altogether passing cgrep `--` after the input file name which means you have chosen not to pass it anything.<br/> You can pass the options by hand since cgrep is a Clang instance so it recognizes every option clang has.<br/> cgrep uses ANSI escape sequences for colors so your terminal should support those.<br/> ## Options -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/> +Here's an option list, though it might not be necessarily up-to-date.<br/> +For an up-to-date list, you can run `cgrep --help`.<br/> ```bash -A=<int> - same as grep, how many lines after the matched line to print @@ -75,10 +75,10 @@ For an up-to-date list, you can run `crep --help`.<br/> --union - match unions only --var - match variables only ``` -`cgrep` is a clang tool, so it will accecpt all valid clang commandline options.<br/> +`cgrep` is a clang tool, so it will accept all valid clang command line options.<br/> ## Known Issues -* bulding cgrep with `-j` will not work because bad makefile.<br/> +* building cgrep with `-j` will not work because bad makefile.<br/> * the coloring is off right now and doesn't work properly.<br/> ======= |