#search #cli #demo #command-line #command-line-tool

bin+lib chap_grrs

A simple command line tool for searching files, line-by-line, with a keyword

2 releases

new 0.1.1 Feb 14, 2025
0.1.0 Feb 14, 2025

#2716 in Command line utilities

Download history 221/week @ 2025-02-11

221 downloads per month

Apache-2.0

13KB
86 lines

GRRS

This is a command line program that allows for searching a file, line by line, for all instances of a keyword.

Installing Globally

With Cargo installed, you may run cargo install chap_grrs

Example Usage

~/$ chap_grrs -- let src/main.rs

   let bar = indicatif::ProgressBar::new_spinner();
   
   let args = Cli::parse();
   
   let file = std::fs::File::open(&args.path).with_context(|| format!("could not read file '{}'", args.path.display()))?;
   
   let mut reader = std::io::BufReader::new(file);
   
   let mut line = String::new();

Dependencies

~4–11MB
~116K SLoC