Search for a regular expression only in a subset of directories

rg

  • Ripgrep is a recursive line-oriented CLI search tool.
    Aims to be a faster alternative to `grep`.
    More information: <https://github.com/BurntSushi/ripgrep>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

rg {{regular_expression}} {{set_of_subdirs}}

click the source code to copy install rg on any operating system with command-not-found.com