From 846d927c7d7ea3253316251953b8f6e32418a660 Mon Sep 17 00:00:00 2001 From: Finn Lis Date: Fri, 20 Dec 2019 21:03:23 +0100 Subject: [PATCH] Suppress warnings caused by 'tput setaf' in non 256-color terminal emulators --- ufetch-openbsd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ufetch-openbsd b/ufetch-openbsd index 4e014de..8a70bc4 100755 --- a/ufetch-openbsd +++ b/ufetch-openbsd @@ -42,14 +42,14 @@ fi # probably don't change these if [ -x "$(command -v tput)" ]; then bold="$(tput bold)" - black="$(tput setaf 0 0 0)" - red="$(tput setaf 1 0 0)" - green="$(tput setaf 2 0 0)" - yellow="$(tput setaf 3 0 0)" - blue="$(tput setaf 4 0 0)" - magenta="$(tput setaf 5 0 0)" - cyan="$(tput setaf 6 0 0)" - white="$(tput setaf 7 0 0)" + black="$(tput setaf 0 0 0 2>/dev/null)" + red="$(tput setaf 1 0 0 2>/dev/null)" + green="$(tput setaf 2 0 0 2>/dev/null)" + yellow="$(tput setaf 3 0 0 2>/dev/null)" + blue="$(tput setaf 4 0 0 2>/dev/null)" + magenta="$(tput setaf 5 0 0 2>/dev/null)" + cyan="$(tput setaf 6 0 0 2>/dev/null)" + white="$(tput setaf 7 0 0 2>/dev/null)" reset="$(tput sgr0)" fi