diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-04-12 09:51:27 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-04-12 09:51:27 +1200 |
commit | efd95c34c7db7686600571243ca00196276fa0ad (patch) | |
tree | e4e1fcbadf294b68ef29fb9d485390daca28a500 /sh/shrc.d/grep.sh | |
parent | Fix up .PHONY targets (diff) | |
download | dotfiles-efd95c34c7db7686600571243ca00196276fa0ad.tar.gz dotfiles-efd95c34c7db7686600571243ca00196276fa0ad.zip |
Use more logical ~/.cache subpath
Diffstat (limited to 'sh/shrc.d/grep.sh')
-rw-r--r-- | sh/shrc.d/grep.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sh/shrc.d/grep.sh b/sh/shrc.d/grep.sh index fc8f62c0..dd85a198 100644 --- a/sh/shrc.d/grep.sh +++ b/sh/shrc.d/grep.sh @@ -1,6 +1,6 @@ # Our ~/.profile should already have made a directory with the supported # options for us; if not, we won't be wrapping grep(1) with a function at all -[ -d "$HOME"/.cache/grep ] || return +[ -d "$HOME"/.cache/sh/opt/grep ] || return # Discard GNU grep(1) environment variables if the environment set them unset -v GREP_OPTIONS @@ -9,31 +9,31 @@ unset -v GREP_OPTIONS grep() { # Add --binary-files=without-match to gracefully skip binary files - [ -e "$HOME"/.cache/grep/binary-files ] && + [ -e "$HOME"/.cache/sh/opt/grep/binary-files ] && set -- --binary-files=without-match "$@" # Add --color=auto if the terminal has at least 8 colors - [ -e "$HOME"/.cache/grep/color ] && + [ -e "$HOME"/.cache/sh/opt/grep/color ] && [ "$({ tput colors || tput Co ; } 2>/dev/null)" -ge 8 ] && set -- --color=auto "$@" # Add --devices=skip to gracefully skip devices - [ -e "$HOME"/.cache/grep/devices ] && + [ -e "$HOME"/.cache/sh/opt/grep/devices ] && set -- --devices=skip "$@" # Add --directories=skip to gracefully skip directories - [ -e "$HOME"/.cache/grep/directories ] && + [ -e "$HOME"/.cache/sh/opt/grep/directories ] && set -- --directories=skip "$@" # Add --exclude to ignore .gitignore and .gitmodules files - [ -e "$HOME"/.cache/grep/exclude ] && + [ -e "$HOME"/.cache/sh/opt/grep/exclude ] && set -- \ --exclude=.gitignore \ --exclude=.gitmodules \ "$@" # Add --exclude-dir to ignore version control dot-directories - [ -e "$HOME"/.cache/grep/exclude-dir ] && + [ -e "$HOME"/.cache/sh/opt/grep/exclude-dir ] && set -- \ --exclude-dir=.cvs \ --exclude-dir=.git \ |