mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-30 17:14:16 +02:00
Set color codes when FORCE_COLOR is true
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
parent
a48665c7bb
commit
daec6f8c02
@ -2,7 +2,8 @@
|
||||
# shellcheck disable=SC2034 # Disable warning about unused variables
|
||||
|
||||
# Determine if terminal is capable of showing colors
|
||||
if [ -t 1 ] && [ "$(tput colors)" -ge 8 ]; then
|
||||
# When COL_TABLE is sourced via gravity invoked by FTL, FORCE_COLOR is set to true
|
||||
if { [ -t 1 ] && [ "$(tput colors)" -ge 8 ]; } || [ "${FORCE_COLOR}" ]; then
|
||||
# Bold and underline may not show up on all clients
|
||||
# If something MUST be emphasized, use both
|
||||
COL_BOLD='[1m'
|
||||
|
Loading…
x
Reference in New Issue
Block a user