A fast and simple CLI file search tool built with Rust. It allows you to search for patterns in files and directories, with support for case-insensitive search and line numbering.
- Fast Search: Efficiently searches through files and directories.
- Pattern Highlighting: Highlights the matched pattern in the output.
- Case-Insensitive Search: Optional case-insensitive matching.
- Line Numbering: Optional display of line numbers for matches.
- Recursive Search: Automatically searches through subdirectories.
To build the tool from source, you need to have Rust and Cargo installed.
git clone https://github.com/rawqubit/rust-grep-tool.git
cd rust-grep-tool
cargo build --releaseThe binary will be available at target/release/rust-grep-tool.
rust-grep-tool [OPTIONS] <PATTERN> [PATH]<PATTERN>: The pattern to search for.[PATH]: The path to the file or directory to search in (default:.).
-i, --ignore-case: Perform case-insensitive search.-l, --line-number: Show line numbers for matches.-h, --help: Print help information.-V, --version: Print version information.
Search for "main" in the current directory:
rust-grep-tool "main"Search for "pattern" in a specific file with line numbers:
rust-grep-tool -l "pattern" src/main.rsCase-insensitive search for "rust" in the src directory:
rust-grep-tool -i "rust" src