| # fx grep |
| |
| print lines in the Fuchsia sources matching the given pattern |
| |
| ```none |
| usage: fx grep [options] <pattern> [-- type_filter...] |
| |
| Convenience wrapper around 'jiri grep' to search the Fuchsia source tree and |
| print lines matching the given pattern. |
| |
| Narrow your search to specific file types: |
| c, cpp: C/C++ source and header files |
| rs, rust: Rust source files |
| py, python: Python source files |
| go: Go source files |
| dart: Dart source files |
| fidl: FIDL source files |
| service, config: Services configuration files |
| cm, manifest: Component manifest files |
| gn, build: GN build files |
| md, doc: Documentation source files |
| |
| The following example searches both C++ and Python files for 'tcgetattr': |
| fx grep tcgetattr -- cpp py |
| ``` |
| |
| [grep source code](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/devshell/contrib/grep) |