Google is committed to advancing racial equity for Black communities. See how.

fx grep

print lines in the Fuchsia and Zircon sources matching the given pattern

usage: fx grep [options] <pattern> [-- type_filter...]

Convenience wrapper around 'jiri grep' to search the Fuchsia and Zircon
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