rg

Search files and directories recursively using regular expressions.

1|Updated Jan 9, 2024
One-click install
npx skills add https://github.com/rickypowell/dotfiles --skill rg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rg
Source: https://github.com/rickypowell/dotfiles/tree/main/opencode/.config/opencode/skills/rg
Command: npx skills add https://github.com/rickypowell/dotfiles --skill rg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a highly efficient way to search for patterns within files and directories, making it easy to find specific information across your codebase or documents.

Core Features & Use Cases

  • Recursive Searching: Searches through directories and subdirectories.
  • Pattern Matching: Uses regular expressions for flexible and powerful pattern matching.
  • Speed: Optimized for performance, significantly faster than traditional grep.
  • Use Case: Quickly find all occurrences of a specific function call or variable name across your entire project.

Quick Start

Search for the word "error" in all files within the current directory and its subdirectories.

Frequently Asked Questions about rg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for a specific string across all files in a directory?

To search for a string across files in a directory, you can use recursive text searching to automatically scan through all subdirectories and match patterns within your codebase or documents.

What is the best way to perform recursive text search with regular expressions?

Recursive text search with regular expressions is best handled by tools leveraging optimized search algorithms, allowing you to find flexible pattern matches across directories significantly faster than traditional grep.

Can I use this to find specific function calls in my code?

Yes, you can find specific function calls in your code by using regular expressions to perform a fast, recursive text search that quickly locates all occurrences of the function name across your project files.

Does recursive text search work for log analysis and configuration files?

Recursive text search works effectively for log analysis and configuration file inspection, utilizing regular expressions to rapidly identify specific patterns, errors, or settings across multiple files and directories.

Why is ripgrep faster than traditional grep for searching code?

Ripgrep is faster than traditional grep for searching code because it leverages optimized search algorithms and efficient directory traversal to perform recursive text searches, significantly reducing the time needed to match patterns.

Are there limitations when using regular expressions to search files?

When using regular expressions to search files, limitations depend on the complexity of your pattern and the size of your directories, though optimized search algorithms are designed to handle large codebases efficiently.