Created
March 8, 2019 13:47
-
-
Save Marneus68/86ee4499926df02818bde552822973b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test -t 1; then | |
ncolors=$(tput colors) | |
if test -n "$ncolors" && test $ncolors -ge 8; then | |
black=$(eval tput setaf 0); | |
red=$(eval tput setaf 1); | |
green=$(eval tput setaf 2); | |
yellow=$(eval tput setaf 3); | |
blue=$(eval tput setaf 4); | |
magenta=$(eval tput setaf 5); | |
cyan=$(eval tput setaf 6); | |
white=$(eval tput setaf 7); | |
reset=$(eval tput sgr0); | |
fi | |
else | |
black=""; | |
red=""; | |
green=""; | |
yellow=""; | |
blue=""; | |
magenta=""; | |
cyan=""; | |
white=""; | |
reset=""; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment