Set color codes when FORCE_COLOR is true
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
# shellcheck disable=SC2034 # Disable warning about unused variables
|
# shellcheck disable=SC2034 # Disable warning about unused variables
|
||||||
|
|
||||||
# Determine if terminal is capable of showing colors
|
# 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
|
# Bold and underline may not show up on all clients
|
||||||
# If something MUST be emphasized, use both
|
# If something MUST be emphasized, use both
|
||||||
COL_BOLD='[1m'
|
COL_BOLD='[1m'
|
||||||
|
|||||||
Reference in New Issue
Block a user