aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/grep.sh
diff options
context:
space:
mode:
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 dd85a198..3df1ee9a 100644
--- a/sh/shrc.d/grep.sh
+++ b/sh/shrc.d/grep.sh
@@ -14,7 +14,7 @@ grep() {
# Add --color=auto if the terminal has at least 8 colors
[ -e "$HOME"/.cache/sh/opt/grep/color ] &&
- [ "$({ tput colors || tput Co ; } 2>/dev/null)" -ge 8 ] &&
+ [ "$({ tput colors||tput Co||echo 0; } 2>/dev/null)" -ge 8 ] &&
set -- --color=auto "$@"
# Add --devices=skip to gracefully skip devices