diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2022-08-17 22:20:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 15:20:22 -0400 |
commit | 1c31de361d345c7cfc9ac2ca7a3040bdfa649d9a (patch) | |
tree | 1680268b83a3f3a45f238dda685cd10a8531b354 /doc/nimgrep.md | |
parent | 60f6724b7003bf2cb63c61e8b2a4b08772672ff4 (diff) | |
download | Nim-1c31de361d345c7cfc9ac2ca7a3040bdfa649d9a.tar.gz |
Markdown code blocks part 5 (#20236)
No logic was added, just a few more `*.md` files have been migrated.
Diffstat (limited to 'doc/nimgrep.md')
-rw-r--r-- | doc/nimgrep.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/nimgrep.md b/doc/nimgrep.md index ff2bf3a8d..e000efb46 100644 --- a/doc/nimgrep.md +++ b/doc/nimgrep.md @@ -22,8 +22,9 @@ Installation Compile nimgrep with the command: -.. code:: cmd + ```cmd nim c -d:release tools/nimgrep.nim + ``` And copy the executable somewhere in your ``$PATH``. @@ -40,9 +41,10 @@ All examples below use default PCRE Regex patterns: + To search recursively in Nim files using style-insensitive identifiers: - .. code:: cmd + ```cmd nimgrep --recursive --ext:'nim|nims' --ignoreStyle # short: -r --ext:'nim|nims' -y + ``` .. Note:: we used `'` quotes to avoid special treatment of `|` symbol for shells like Bash @@ -50,15 +52,17 @@ All examples below use default PCRE Regex patterns: + To exclude version control directories (Git, Mercurial=hg, Subversion=svn) from the search: - .. code:: cmd + ```cmd nimgrep --excludeDir:'^\.git$' --excludeDir:'^\.hg$' --excludeDir:'^\.svn$' # short: --ed:'^\.git$' --ed:'^\.hg$' --ed:'^\.svn$' + ``` + To search only in paths containing the `tests` sub-directory recursively: - .. code:: cmd + ```cmd nimgrep --recursive --includeDir:'(^|/)tests($|/)' # short: -r --id:'(^|/)tests($|/)' + ``` .. Attention:: note the subtle difference between `--excludeDir`:option: and `--includeDir`:option:\: the former is applied to relative directory entries |