perg 0.3.0

perg is a small command-line tool to search for given string inside a file
Documentation

perg

A micro lightweight alternative to grep, without highlighting, written in Rust. Currently it only support local path.

 perg --help

perg 0.1.0

USAGE:
    perg <pattern> <path>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <pattern>
    <path>

Installation

Using Cargo via rustup:

 curl https://sh.rustup.rs -sSf | sh

then install perg binary:

 cargo install perg

Usage

Quick example

on current repo:

 perg v src/main.rs
    #[derive(StructOpt)]
    #[derive(Debug)]
Another Example

on a test file, then search for a pattern:

 echo "hello world\nhi world\nby world" >> test.md
 cat test.md
    # hello world
    # hi world
    # by world
 perg e test.md
    # hello world
    # bye world
Regular Expression

perg also support regular expression search, like grep:

 perg "h[ei]" test.md
    # hello world
    # hi world

 perg "hello|bye" test.md
    # hello world
    # bye world

Help, feedback or suggestions?

Feel free to contact me on Twitter for discussions, news & announcements & other projects. :rocket: