aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/grep.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-05-30 20:52:46 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-05-30 20:52:46 +1200
commit996d86bcb959bbdf4ae82718f26d19dcfc15bf6d (patch)
treef1fdaf58989475c8f994919a74ab875d42731af5 /bash/bashrc.d/grep.bash
parentAlign multiline if conditions (diff)
downloaddotfiles-996d86bcb959bbdf4ae82718f26d19dcfc15bf6d.tar.gz
dotfiles-996d86bcb959bbdf4ae82718f26d19dcfc15bf6d.zip
Ignore tput(1) stderr
Diffstat (limited to 'bash/bashrc.d/grep.bash')
-rw-r--r--bash/bashrc.d/grep.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc.d/grep.bash b/bash/bashrc.d/grep.bash
index de225347..4560c4ac 100644
--- a/bash/bashrc.d/grep.bash
+++ b/bash/bashrc.d/grep.bash
@@ -23,7 +23,7 @@ grepopts() {
# If the --color option is available and we have a terminal that supports
# at least eight colors, add --color=auto to the options
- local colors=$(tput colors)
+ local colors=$(tput colors 2>/dev/null)
if [[ $grephelp == *--color* ]] && ((colors >= 8)) ; then
grepopts=("${grepopts[@]}" --color=auto)
fi