Limit search to files of a specific type

ack

  • A search tool like grep, optimized for developers.
    See also: `rg`, which is much faster.
    More information: <https://beyondgrep.com/documentation>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

ack --type={{ruby}} "{{search_pattern}}"

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