diff options
Diffstat (limited to 'bash')
-rw-r--r-- | bash/colors | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bash/colors b/bash/colors index 12e5a31..9360898 100644 --- a/bash/colors +++ b/bash/colors @@ -1,4 +1,9 @@ -if [[ -n "$(which tput)" && "$(__tmp=$(tput setf 0); echo $?)" == "0" ]]; then +function test_tput { + local tmp + [[ -x "$(which tput)" ]] || return 1 + tmp=$(tput setf 0) +} +if test_tput; then GRAY=$(tput setf 8) BLACK=$(tput setf 0) RED=$(tput setf 4) |