vgrep-0.2.2.0: A pager for grep

Safe HaskellNone
LanguageHaskell2010

Vgrep.System.Grep

Description

Utilities for invoking grep

Synopsis

Documentation

grep :: Producer Text IO () -> Producer Text IO () Source #

Takes a Text stream and runs it through a grep process, returning a stream of results. The original command line arguments are passed to the process.

grepForApp :: Producer Text IO () -> Producer Text IO () Source #

Like grep, but if the input is not prefixed with a file and line number, i. e. is not valid grep -nH output, then adds -nH (-n: with line number, -H: with file name) to the grep command line arguments.

recursiveGrep :: Producer Text IO () Source #

Invokes grep -nH -rI (-n: with line number, -H: with file name, -r: recursive, -I: ignore binary files) and returns the results as a stream. More arguments (e. g. pattern and directory) are taken from the command line.