From ab6cb2673a51f8582e82828b15fd62f303f54d75 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jul 2017 23:57:23 +1200 Subject: Gracefully handle two failed tput color calls --- sh/shrc.d/tree.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sh/shrc.d/tree.sh') diff --git a/sh/shrc.d/tree.sh b/sh/shrc.d/tree.sh index b4f91df8..ca134fe2 100644 --- a/sh/shrc.d/tree.sh +++ b/sh/shrc.d/tree.sh @@ -21,7 +21,7 @@ tree() { [ -t 1 ] || exit # Not if output terminal doesn't have at least 8 colors - [ "$({ tput colors || tput Co ; } 2>/dev/null)" -ge 8 ] || exit + [ "$({ tput colors||tput Co||echo 0; } 2>/dev/null)" -ge 8 ] ) ; then set -- -C "$@" -- cgit v1.2.3