Skip to content

Commit

Permalink
[docs] Describe using git grep in FAQ.
Browse files Browse the repository at this point in the history
Also changed the grep example to use long flag names for clarity.
  • Loading branch information
varungandhi-apple committed Sep 9, 2020
1 parent 296d252 commit b6558fd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/HowToGuides/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ This very depends on what X is, but some broad guidelines are:
1. Do a case-insensitive recursive string search.
- Use a specialized tool like [ripgrep](https://github.com/BurntSushi/ripgrep)
or [ag](https://github.com/ggreer/the_silver_searcher).
- Use `git grep --ignore-case "mypattern"`. `git grep` also supports helpful
flags which provide more context:
- `--show-function`: Tries to print the function name that a match was
found in.
- `--function-context`: Tries to print the entire surrounding function
containing the match.
- Use 'Find in Workspace' in Xcode (<kbd></kbd>+<kbd></kbd>+<kbd>F</kbd>).
- Use `grep -i -r "mypattern" .`.
- Use `grep --ignore-case --recursive "mypattern" .`.
2. Go through the [Documentation Index](/docs/README.md).

### How do I build the documentation as HTML?
Expand Down

0 comments on commit b6558fd

Please sign in to comment.