Skip to content

Commit

Permalink
fix: COLOR_ENABLED=yes when $TERM match *-color
Browse files Browse the repository at this point in the history
  • Loading branch information
adoyle-h committed Jun 10, 2023
1 parent 56bc550 commit fffa3c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/colors.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# Attentions: GREY may not work in some shells

case "${TERM:-}" in
xterm-color|*-256color) COLOR_ENABLED=yes;;
*-color|*-256color) COLOR_ENABLED=yes;;
*) COLOR_ENABLED= ;;
esac

if [[ -n "${COLOR_FORCE_ENABLED:-}" ]]; then
if [[ -x /usr/bin/tput ]] && tput setaf 1 >&/dev/null; then
if tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48 (ISO/IEC-6429).
# (Lack of such support is extremely rare, and such a case would tend to support setf rather than setaf.)
COLOR_ENABLED=yes
Expand Down

0 comments on commit fffa3c8

Please sign in to comment.