aboutsummaryrefslogtreecommitdiff
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
parentAlign multiline if conditions (diff)
downloaddotfiles-996d86bcb959bbdf4ae82718f26d19dcfc15bf6d.tar.gz
dotfiles-996d86bcb959bbdf4ae82718f26d19dcfc15bf6d.zip
Ignore tput(1) stderr
-rw-r--r--bash/bashrc.d/grep.bash2
-rw-r--r--bash/bashrc.d/ls.bash2
2 files changed, 2 insertions, 2 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
diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash
index 255d6cd3..a559a44a 100644
--- a/bash/bashrc.d/ls.bash
+++ b/bash/bashrc.d/ls.bash
@@ -9,7 +9,7 @@ lsopts() {
# 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 [[ $lshelp == *--color* ]] && ((colors >= 8)) ; then
lsopts=("${lsopts[@]}" --color=auto)
fi