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.
Loading
Please register or sign in to comment