Skip to content
Commit 90d78aae authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Improve shell & vim grepping using wrapper script

~/.shell/bin/grep-auto-exclude - a wrapper around `grep`

The environment variable GREP_EXCLUDE_DIRS can be used to specify any
more space-delimited directories to exclude from recursively grepping,
on top of the known VCS directories.

This wrapper is intended to be used in vim as a grep command:

    set grepprg=~/.shell/bin/grep-auto-exclude\ -n

or as a shell aliases like so:

    alias grep='~/.shell/bin/grep-auto-exclude grep --color=auto -n'

In which case calling `grep FOO -r .` will result in a colourful, numbered
output which does not recurse into VCS directories or any directories
listed in GREP_EXCLUDE_DIRS.
parent 8576e3e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment