fmthoma / vgrep

A pager for grep
BSD 3-Clause "New" or "Revised" License
104 stars 8 forks source link

Make `grep` tool configurable #34

Open fmthoma opened 7 years ago

fmthoma commented 7 years ago

E.g. in ~/.vgrep/config.yaml:

…
backend:
    grep-command: "grep -nH --color=always"
    recursive-grep-command: "grep -rnHI --color=always"
    …

Use cases:

OTOH: Part of the functionality can simply be emulated using a shell alias:

alias vgrep='function __ack_vgrep() { ack --color "$@" | vgrep; }; __ack_vgrep'

with the restriction that some arguments (like --help, --version) will produce garbled output, and that piping (vgrep foo | vgrep bar) is not possible.