aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/grep.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-19 11:11:42 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-19 11:11:42 +1300
commit84f9ddc9214401bdb7e5f6f3e5133d24b29e4917 (patch)
tree88dc8ad4a3df161792718e7718c79d17ee6d5254 /sh/shrc.d/grep.sh
parentMerge branch 'release/v3.2.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-573b7ee745b119cd0fa9432af7e40302f2cd8fbb.tar.gz (sig)
dotfiles-573b7ee745b119cd0fa9432af7e40302f2cd8fbb.zip
Merge branch 'release/v3.3.0'v3.3.0
* release/v3.3.0: Bump VERSION Add sh.vim mapping to insert '\'' quickly Remove now-unneeded shellcheck disable rules Follow ShellCheck's recommendation of -z over !-n Adjust PS1-PS4 reset Use exec for clearer subshell semantics Use `command` consistently, silence ShellCheck Add /j flag to :vimgrep shortcut
Diffstat (limited to 'sh/shrc.d/grep.sh')
-rw-r--r--sh/shrc.d/grep.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/shrc.d/grep.sh b/sh/shrc.d/grep.sh
index 997babc9..c448c81d 100644
--- a/sh/shrc.d/grep.sh
+++ b/sh/shrc.d/grep.sh
@@ -15,7 +15,7 @@ grep() {
# Add --color=auto if the terminal has at least 8 colors
if [ -e "$HOME"/.cache/sh/opt/grep/color ] &&
- [ "$({ tput colors||tput Co||echo 0; } 2>/dev/null)" -ge 8 ] ; then
+ [ "$(exec 2>/dev/null;tput colors||tput Co||echo 0)" -ge 8 ] ; then
set -- --color=auto "$@"
fi