we've long used the dircolors database as a proxy to see whether the
active terminal supports color.  basically something like:
        eval "$(dircolors -b)"
        if [[ -n ${LS_COLORS} ]] ; then
                # env supports colors
        fi

but having to go through the eval & LS_COLORS testing is kind of annoying.
how do people feel about extending the interface so that we can merely test
the database ?  something like:
        dircolors --check-term[=TERM] [FILE]

then we can do:
        if dircolors --check-term ; then
                # env supports colors
        fi
-mike

Attachment: signature.asc
Description: Digital signature

Reply via email to