# Include me for neat color defines! if [ -z "${__ansi_sh_loaded}" ] then __ansi_sh_loaded=yes # ANSI formats e="$(printf "\033")" # ANSI styles a_bright="$e[1m" a_dim="$e[2m" a_italic="$e[3m" # Probably won't work a_underline="$e[4m" # Probably won't work a_blink="$e[5m" # Annoying; probably won't work a_flash="$e[6m" # Probably won't work a_inverse="$e[7m" a_conceal="$e[8m" # Probably won't work a_strike="$e[9m" # Probably won't work # ANSI colors a_red="$e[1;31m" a_green="$e[1;32m" a_yellow="$e[1;33m" a_blue="$e[1;34m" a_purple="$e[1;35m" a_cyan="$e[1;36m" a_white="$e[1;37m" a_gloom="$e[1;30m" a_crimson="$e[0;31m" a_forest="$e[0;32m" a_brown="$e[0;33m" a_navy="$e[0;34m" a_violet="$e[0;35m" a_aqua="$e[0;36m" a_gray="$e[0;37m" a_black="$e[0;30m" a_bred="$e[41m" a_bgreen="$e[42m" a_bbrown="$e[43m" a_bblue="$e[44m" a_bpurple="$e[45m" a_bcyan="$e[46m" a_bgray="$e[47m" a_bblack="$e[40m" # Normal is at the bottom, otherwise debugging via 'sh -x' is difficult a_normal="$e[0m" a() { while [ "${1}" ] do eval "echo \${a_$1}" shift done } fi