#grep #utility #query #search #search-file #src #pattern

bin+lib globgrep

grep utility written in Rust

1 unstable release

0.1.0 Oct 2, 2022

#15 in #search-file

Custom license

7KB
121 lines

The Grep utility written in Rust

How to use

The app take 2 arguments: query search, file pattern. Also, it has a couple of options set up from environment variables. See the examples below:

cargo run -- "fn main" "src/*.rs"
IGNORE_CASE=1 cargo run -- "result" "src/main.rs"
IS_REGEXP=1 cargo run -- "fn.*Result" "src/main*"
IS_REGEXP=1 IGNORE_CASE=1 cargo run -- "fn.*result" "src/main*"

Or if you want to run the binary only:

cargo build
IS_REGEXP=1 IGNORE_CASE=1 ./target/debug/globgrep "fn.*result" "src/main*"

Dependencies

~2.1–3MB
~54K SLoC